Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29331055: Issue #1234 - Remove 'CString' from PluginFilter.* (Closed)

Created:
Nov. 26, 2015, 2:21 p.m. by Eric
Modified:
May 17, 2016, 7:31 p.m.
Reviewers:
sergei, Oleksandr
CC:
Felix Dahlke
Visibility:
Public.

Description

Issue #1234 - Remove 'CString' from PluginFilter.* Change all string declarations in PluginFilter.h to 'std::wstring'. Most were 'CString'; one was 'CComBSTR'. Change all local string variables in PluginFilter.cpp to 'CString'. Remove declaration cruft from CFilterElementHideAttrSelector. Change declaration to 'struct', since all members were public. Inline the constructor initializations. Eliminate explicit copy constructor and destructor, since they were no different from the defaults. Replace 'CString::TrimRight' and 'CString::TrimLeft' with a reworked set of 'TrimString*' functions. Expand existing unit tests to include test points for new 'TrimString*' functions. Added unit tests to verify argument-passing behavior. Replace 'CString::Tokenize' with loops built around 'wcstok_s()'. Tighten up the parsing in the constructor for 'CFilterElementHide'. Add a utility exception class, alleviating duplication of exceptions and logging.

Patch Set 1 : #

Total comments: 58

Patch Set 2 : address comments #

Total comments: 4

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Patch Set 6 : rebase #

Total comments: 33

Patch Set 7 : remove TokenSequence #

Total comments: 3

Patch Set 8 : fix whitespace nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -265 lines) Patch
M src/plugin/PluginFilter.h View 1 2 3 4 5 6 5 chunks +20 lines, -25 lines 0 comments Download
M src/plugin/PluginFilter.cpp View 1 2 3 4 5 6 7 11 chunks +228 lines, -217 lines 0 comments Download
M src/shared/Utils.h View 1 2 3 1 chunk +46 lines, -6 lines 0 comments Download
M test/UtilTest.cpp View 1 2 3 4 5 6 1 chunk +103 lines, -17 lines 0 comments Download

Messages

Total messages: 20
Eric
Nov. 29, 2015, 4:03 p.m. (2015-11-29 16:03:56 UTC) #1
sergei
A tremendous amount of work is done here! I have not taken a look at ...
Nov. 30, 2015, 12:37 p.m. (2015-11-30 12:37:55 UTC) #2
Eric
Patch set 2 addresses sergei's comments. On 2015/11/30 12:37:55, sergei wrote: > I have not ...
Nov. 30, 2015, 3:54 p.m. (2015-11-30 15:54:08 UTC) #3
sergei
https://codereview.adblockplus.org/29331055/diff/29331528/src/plugin/PluginFilter.cpp File src/plugin/PluginFilter.cpp (right): https://codereview.adblockplus.org/29331055/diff/29331528/src/plugin/PluginFilter.cpp#newcode171 src/plugin/PluginFilter.cpp:171: ElementHideParseError(filterText, "empty attribute name before " + std::string(1, static_cast<char>(arg[0])) ...
Nov. 30, 2015, 4:36 p.m. (2015-11-30 16:36:03 UTC) #4
Eric
https://codereview.adblockplus.org/29331055/diff/29331528/src/plugin/PluginFilter.cpp File src/plugin/PluginFilter.cpp (right): https://codereview.adblockplus.org/29331055/diff/29331528/src/plugin/PluginFilter.cpp#newcode281 src/plugin/PluginFilter.cpp:281: TokenSequence<std::wstring> ts(classNameList, L" "); On 2015/11/30 16:36:03, sergei wrote: ...
Nov. 30, 2015, 5:05 p.m. (2015-11-30 17:05:47 UTC) #5
Oleksandr
This was a gargantuan review indeed, thanks :) I would simplify it a bit though. ...
Dec. 4, 2015, 1:03 a.m. (2015-12-04 01:03:17 UTC) #6
Eric
New patch set. Rebase only affect the GYP file. https://codereview.adblockplus.org/29331055/diff/29331528/src/plugin/PluginFilter.cpp File src/plugin/PluginFilter.cpp (right): https://codereview.adblockplus.org/29331055/diff/29331528/src/plugin/PluginFilter.cpp#newcode281 src/plugin/PluginFilter.cpp:281: ...
Dec. 6, 2015, 5:39 p.m. (2015-12-06 17:39:57 UTC) #7
Eric
New patch set is a rebase. Its only difference is to remove the declaration and ...
Dec. 14, 2015, 12:12 p.m. (2015-12-14 12:12:50 UTC) #8
Eric
Patch set 5 is the same as previous except for removing the definition of 'ToLowerString()', ...
Dec. 14, 2015, 4:21 p.m. (2015-12-14 16:21:31 UTC) #9
Eric
It's been two weeks since any response on this review. The only sticking point seems ...
Dec. 22, 2015, 12:47 p.m. (2015-12-22 12:47:24 UTC) #10
Eric
Patch set 6 is a rebase only. (The fourth one in a row, for the ...
Jan. 5, 2016, 4:12 p.m. (2016-01-05 16:12:33 UTC) #11
sergei
JIC, review of TokenSequence https://codereview.adblockplus.org/29331055/diff/29333226/src/plugin/TokenSequence.h File src/plugin/TokenSequence.h (right): https://codereview.adblockplus.org/29331055/diff/29333226/src/plugin/TokenSequence.h#newcode26 src/plugin/TokenSequence.h:26: typedef TokenSequenceConstIterator<T> ConstIterator; I would ...
Jan. 25, 2016, 2:13 p.m. (2016-01-25 14:13:55 UTC) #12
Eric
I've addressed all of Sergei's comments. No changes to behavior were necessary. There might be ...
Jan. 26, 2016, 3:54 p.m. (2016-01-26 15:54:21 UTC) #13
sergei
IMO, TokenSequence has too specific implementation, so I would rather prefer to don't have it, ...
Jan. 26, 2016, 10:34 p.m. (2016-01-26 22:34:59 UTC) #14
Oleksandr
> The performance overhead of stream buffering is rather large, particularly for > something as ...
Jan. 27, 2016, 1:31 a.m. (2016-01-27 01:31:34 UTC) #15
Eric
On 2016/01/27 01:31:34, Oleksandr wrote: > Let's look at the numbers. In my quick and ...
Feb. 4, 2016, 6:09 p.m. (2016-02-04 18:09:14 UTC) #16
Eric
Patch set 7 removes 'TokenSequence' and replaces it with loops based on 'wcstok_s'.
Feb. 4, 2016, 7:50 p.m. (2016-02-04 19:50:44 UTC) #17
Oleksandr
LGTM
May 2, 2016, 12:36 p.m. (2016-05-02 12:36:33 UTC) #18
sergei
Beside a couple of nits LGTM. https://codereview.adblockplus.org/29331055/diff/29335758/src/plugin/PluginFilter.cpp File src/plugin/PluginFilter.cpp (right): https://codereview.adblockplus.org/29331055/diff/29335758/src/plugin/PluginFilter.cpp#newcode79 src/plugin/PluginFilter.cpp:79: //TODO: Add support ...
May 2, 2016, 2:33 p.m. (2016-05-02 14:33:49 UTC) #19
Eric
May 17, 2016, 7:30 p.m. (2016-05-17 19:30:39 UTC) #20
Patch set 8 moves one white space character in a comment.

https://codereview.adblockplus.org/29331055/diff/29335758/src/shared/Utils.h
File src/shared/Utils.h (right):

https://codereview.adblockplus.org/29331055/diff/29335758/src/shared/Utils.h#...
src/shared/Utils.h:85: text.erase(text.begin(), std::find_if(text.begin(),
text.end(), isNotWhitespace<T::value_type>));
On 2016/05/02 14:33:48, sergei wrote:
> Does it compile? I expect "typename" before "T::value_type".

Of course it compiles. Do _you_ post code to review that doesn't compile?

It has passed unit tests since the very first patch set. How would that have
happened if it didn't compile?

Powered by Google App Engine
This is Rietveld