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

Issue 29330618: Issue #1234 - Eliminate CString from PluginSettings.* and PluginUserSettings.* (Closed)

Created:
Nov. 20, 2015, 6:37 p.m. by Eric
Modified:
Nov. 26, 2015, 12:50 p.m.
Reviewers:
sergei, Oleksandr
CC:
Felix Dahlke
Visibility:
Public.

Description

Issue #1234 - Eliminate CString from PluginSettings.* and PluginUserSettings.* Converted CString variables to std::wstring in PluginSettings.* and PluginUserSettings.*. Inlined a few functions that were only called once. Corrected incorrect returns of DISP_E_EXCEPTION wtih DISP_E_BADINDEX.

Patch Set 1 #

Total comments: 13

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+372 lines, -390 lines) Patch
M src/plugin/AdblockPlusClient.h View 1 3 chunks +3 lines, -4 lines 0 comments Download
M src/plugin/PluginClass.cpp View 2 chunks +1 line, -2 lines 0 comments Download
M src/plugin/PluginSettings.h View 1 1 chunk +93 lines, -96 lines 0 comments Download
M src/plugin/PluginSettings.cpp View 1 1 chunk +245 lines, -257 lines 0 comments Download
M src/plugin/PluginUserSettings.cpp View 1 13 chunks +30 lines, -31 lines 0 comments Download

Messages

Total messages: 6
Eric
https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/AdblockPlusClient.h File src/plugin/AdblockPlusClient.h (left): https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/AdblockPlusClient.h#oldcode96 src/plugin/AdblockPlusClient.h:96: std::wstring GetAppLocale(); Dead code. https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/PluginSettings.h File src/plugin/PluginSettings.h (left): https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/PluginSettings.h#oldcode87 ...
Nov. 20, 2015, 6:46 p.m. (2015-11-20 18:46:04 UTC) #1
Oleksandr
Changing return value definitely looks like something for a different change set. Also, I personally ...
Nov. 25, 2015, 3:22 a.m. (2015-11-25 03:22:08 UTC) #2
sergei
https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/PluginSettings.cpp File src/plugin/PluginSettings.cpp (right): https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/PluginSettings.cpp#newcode106 src/plugin/PluginSettings.cpp:106: filterList.insert(std::make_pair(it.url,it.title)); the space after comma is missed https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/PluginUserSettings.cpp File ...
Nov. 25, 2015, 9:27 a.m. (2015-11-25 09:27:09 UTC) #3
Eric
> Also, I personally preferred the functions inlined here > not inlined. But I don't ...
Nov. 25, 2015, 5:31 p.m. (2015-11-25 17:31:02 UTC) #4
Oleksandr
LGTM
Nov. 26, 2015, 8:28 a.m. (2015-11-26 08:28:10 UTC) #5
sergei
Nov. 26, 2015, 11:06 a.m. (2015-11-26 11:06:18 UTC) #6
LGTM

https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/PluginUs...
File src/plugin/PluginUserSettings.cpp (right):

https://codereview.adblockplus.org/29330618/diff/29330619/src/plugin/PluginUs...
src/plugin/PluginUserSettings.cpp:186: std::wstring message =
dictionary->Lookup(ToUtf8String(std::wstring(section)),
ToUtf8String(std::wstring(key)));
On 2015/11/25 17:31:02, Eric wrote:
> On 2015/11/25 09:27:08, sergei wrote:
> > Nit: strictly speaking we should use the length obtained via `SysStringLen`
> 
> Done.
> 
> There are a few other places where we need this conversion. We probably ought
to
> define a conversion constructor for it, analogous to the one we have for
CString
> conversion:
> 
>   std::wstring ToWstring( BSTR )
> 
> ... but not in this change set.
Sure, feel free to create the issue for it.

Powered by Google App Engine
This is Rietveld