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

Issue 5171515343503360: Issue #41 - Bring method of determining IE version up to date (Closed)

Created:
June 21, 2014, 8:25 p.m. by Eric
Modified:
Jan. 6, 2015, 5:35 p.m.
Reviewers:
sergei, Oleksandr
CC:
Felix Dahlke
Visibility:
Public.

Description

Added retrieval functions for the installed IE version, both for the full version string as well as the numeric major version. Implemented class Registry_Key. Added unit tests for these. Removed CAdblockPlusClient::GetIEVersion(), replacing it with the new IE major version function. Populate the 'AppInfo::applicationVersion' field. This fixes https://issues.adblockplus.org/ticket/41 Kept new registry and version functions in their own files. This is in preparation to use this code as part of the changes needed by https://issues.adblockplus.org/ticket/404

Patch Set 1 #

Total comments: 13

Patch Set 2 : Second version #

Total comments: 15

Patch Set 3 : #

Total comments: 8

Patch Set 4 : reformatted #

Patch Set 5 : simplify Registry_Key #

Total comments: 80

Patch Set 6 : #

Total comments: 1

Patch Set 7 : #

Total comments: 8

Patch Set 8 : Final (?) #

Total comments: 2

Patch Set 9 : Final (?) 2 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+348 lines, -29 lines) Patch
M adblockplus.gyp View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M src/engine/Main.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M src/plugin/AdblockPlusClient.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M src/plugin/AdblockPlusClient.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -21 lines 0 comments Download
M src/plugin/PluginClass.cpp View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M src/plugin/PluginTabBase.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M src/plugin/PluginWbPassThrough.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 2 comments Download
A src/shared/IE_version.h View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A src/shared/IE_version.cpp View 1 2 3 4 5 6 7 1 chunk +96 lines, -0 lines 0 comments Download
A src/shared/Registry.h View 1 2 3 4 5 6 7 1 chunk +62 lines, -0 lines 0 comments Download
A src/shared/Registry.cpp View 1 2 3 4 5 6 7 1 chunk +70 lines, -0 lines 0 comments Download
A test/RegistryTest.cpp View 1 2 3 4 5 6 7 1 chunk +91 lines, -0 lines 4 comments Download

Messages

Total messages: 32
Eric
http://codereview.adblockplus.org/5171515343503360/diff/5629499534213120/src/shared/Utils.cpp File src/shared/Utils.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/5629499534213120/src/shared/Utils.cpp#newcode133 src/shared/Utils.cpp:133: { Registry_Key should be used to refactor use of ...
June 21, 2014, 8:45 p.m. (2014-06-21 20:45:36 UTC) #1
Oleksandr
http://codereview.adblockplus.org/5171515343503360/diff/5629499534213120/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (left): http://codereview.adblockplus.org/5171515343503360/diff/5629499534213120/src/plugin/PluginClass.cpp#oldcode670 src/plugin/PluginClass.cpp:670: if (CPluginClient::GetInstance()->GetIEVersion() > 6) IIRC IE6 was not starting ...
June 22, 2014, 9:53 p.m. (2014-06-22 21:53:17 UTC) #2
Wladimir Palant
Please note that I am no longer reviewing IE changes - fhd should be the ...
June 23, 2014, 6:54 a.m. (2014-06-23 06:54:49 UTC) #3
Eric
On 2014/06/23 06:54:49, Wladimir Palant wrote: > Please note that I am no longer reviewing ...
June 25, 2014, 5:46 p.m. (2014-06-25 17:46:12 UTC) #4
Eric
Wladimir, I've added Felix and I'll take you off right after this mail goes out. ...
June 25, 2014, 6:52 p.m. (2014-06-25 18:52:02 UTC) #5
Eric
OK. I've uploaded a whole new version of the same review. (1) Felix is now ...
June 25, 2014, 6:56 p.m. (2014-06-25 18:56:09 UTC) #6
Oleksandr
http://codereview.adblockplus.org/5171515343503360/diff/5629499534213120/src/shared/Utils.cpp File src/shared/Utils.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/5629499534213120/src/shared/Utils.cpp#newcode189 src/shared/Utils.cpp:189: static HKEY predefined_hkeys[ 5 ] = It's fixed here, ...
July 15, 2014, 6:25 p.m. (2014-07-15 18:25:11 UTC) #7
Eric
http://codereview.adblockplus.org/5171515343503360/diff/5676830073815040/src/shared/Utils.cpp File src/shared/Utils.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/5676830073815040/src/shared/Utils.cpp#newcode137 src/shared/Utils.cpp:137: class Registry_Key On 2014/07/15 18:25:11, Oleksandr wrote: > I'd ...
July 20, 2014, 6:18 p.m. (2014-07-20 18:18:45 UTC) #8
Eric
Rebased to current head. Added Sergei.
July 23, 2014, 5:06 p.m. (2014-07-23 17:06:49 UTC) #9
Oleksandr
http://codereview.adblockplus.org/5171515343503360/diff/5676830073815040/src/shared/Utils.cpp File src/shared/Utils.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/5676830073815040/src/shared/Utils.cpp#newcode156 src/shared/Utils.cpp:156: : unsigned int I think this is an overkill. ...
July 25, 2014, 10:23 p.m. (2014-07-25 22:23:46 UTC) #10
Eric
Reformatted code only in patch set 4. Rework of Registry_Key constructor to follow. http://codereview.adblockplus.org/5171515343503360/diff/5676830073815040/src/shared/Utils.cpp File ...
July 26, 2014, 3:54 p.m. (2014-07-26 15:54:45 UTC) #11
Eric
July 26, 2014, 5:02 p.m. (2014-07-26 17:02:48 UTC) #12
Oleksandr
Almost there, it seems! http://codereview.adblockplus.org/5171515343503360/diff/5689792285114368/src/shared/IE_version.h File src/shared/IE_version.h (right): http://codereview.adblockplus.org/5171515343503360/diff/5689792285114368/src/shared/IE_version.h#newcode5 src/shared/IE_version.h:5: namespace IE It does make ...
July 27, 2014, 10:13 p.m. (2014-07-27 22:13:29 UTC) #13
sergei
http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp#newcode410 src/engine/Main.cpp:410: appInfo.applicationVersion = ToUtf8String(AdblockPlus::IE::installed_version_string()); Why do we need it here? ...
July 28, 2014, 11:46 a.m. (2014-07-28 11:46:27 UTC) #14
Eric
http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/shared/IE_version.cpp File src/shared/IE_version.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/shared/IE_version.cpp#newcode70 src/shared/IE_version.cpp:70: if (version[ 1 ] == L'.') On 2014/07/27 22:13:30, ...
July 28, 2014, 11:48 a.m. (2014-07-28 11:48:42 UTC) #15
Eric
http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp#newcode410 src/engine/Main.cpp:410: appInfo.applicationVersion = ToUtf8String(AdblockPlus::IE::installed_version_string()); On 2014/07/28 11:46:27, sergei wrote: > ...
July 29, 2014, 12:42 p.m. (2014-07-29 12:42:25 UTC) #16
sergei
If it's related to some issue from issues.adblockplus.org it should be pointed here.
July 29, 2014, 1:06 p.m. (2014-07-29 13:06:48 UTC) #17
Eric
On 2014/07/29 13:06:48, sergei wrote: > If it's related to some issue from http://issues.adblockplus.org it ...
July 29, 2014, 1:22 p.m. (2014-07-29 13:22:23 UTC) #18
sergei
http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp#newcode410 src/engine/Main.cpp:410: appInfo.applicationVersion = ToUtf8String(AdblockPlus::IE::installed_version_string()); Still disagree here. Why do we ...
July 29, 2014, 2:45 p.m. (2014-07-29 14:45:55 UTC) #19
Eric
I didn't get to all the renaming possible, only the ones visible in the plugin ...
July 29, 2014, 2:49 p.m. (2014-07-29 14:49:40 UTC) #20
Eric
Comments on previous draft. http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp#newcode410 src/engine/Main.cpp:410: appInfo.applicationVersion = ToUtf8String(AdblockPlus::IE::installed_version_string()); On 2014/07/29 ...
July 29, 2014, 3:17 p.m. (2014-07-29 15:17:22 UTC) #21
sergei
http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp#newcode410 src/engine/Main.cpp:410: appInfo.applicationVersion = ToUtf8String(AdblockPlus::IE::installed_version_string()); > OK, but this is a ...
July 30, 2014, 10:42 a.m. (2014-07-30 10:42:04 UTC) #22
Eric
Updated to remove extraneous test class definitions. http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp#newcode410 src/engine/Main.cpp:410: appInfo.applicationVersion = ...
July 30, 2014, 1:02 p.m. (2014-07-30 13:02:04 UTC) #23
sergei
http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/6063544634179584/src/engine/Main.cpp#newcode410 src/engine/Main.cpp:410: appInfo.applicationVersion = ToUtf8String(AdblockPlus::IE::installed_version_string()); > Code review, I will restate, ...
July 30, 2014, 1:49 p.m. (2014-07-30 13:49:20 UTC) #24
Eric
Bump. Can we finish this? I've addressed all the technical comments and there's been a ...
Aug. 5, 2014, 3:27 p.m. (2014-08-05 15:27:25 UTC) #25
Oleksandr
LGTM!
Aug. 17, 2014, 10:14 p.m. (2014-08-17 22:14:47 UTC) #26
sergei
http://codereview.adblockplus.org/5171515343503360/diff/4551610919288832/src/shared/IE_version.cpp File src/shared/IE_version.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/4551610919288832/src/shared/IE_version.cpp#newcode23 src/shared/IE_version.cpp:23: std::wstring IE_version_string() In this file names also should be ...
Oct. 21, 2014, 11:18 a.m. (2014-10-21 11:18:32 UTC) #27
Eric
Let's hope this is the final round. http://codereview.adblockplus.org/5171515343503360/diff/4551610919288832/src/shared/IE_version.cpp File src/shared/IE_version.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/4551610919288832/src/shared/IE_version.cpp#newcode23 src/shared/IE_version.cpp:23: std::wstring IE_version_string() ...
Jan. 4, 2015, 11:06 p.m. (2015-01-04 23:06:03 UTC) #28
sergei
http://codereview.adblockplus.org/5171515343503360/diff/5682617542246400/src/plugin/PluginWbPassThrough.cpp File src/plugin/PluginWbPassThrough.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/5682617542246400/src/plugin/PluginWbPassThrough.cpp#newcode13 src/plugin/PluginWbPassThrough.cpp:13: <Merge Conflict>#include "../shared/IE_version.h" "Merge Conflict" Do we need this ...
Jan. 5, 2015, 12:24 p.m. (2015-01-05 12:24:23 UTC) #29
Eric
http://codereview.adblockplus.org/5171515343503360/diff/5682617542246400/src/plugin/PluginWbPassThrough.cpp File src/plugin/PluginWbPassThrough.cpp (right): http://codereview.adblockplus.org/5171515343503360/diff/5682617542246400/src/plugin/PluginWbPassThrough.cpp#newcode13 src/plugin/PluginWbPassThrough.cpp:13: <Merge Conflict>#include "../shared/IE_version.h" On 2015/01/05 12:24:23, sergei wrote: > ...
Jan. 5, 2015, 1:08 p.m. (2015-01-05 13:08:20 UTC) #30
sergei
LGTM, It takes too long, I'm pretty sure we will change some parts of it ...
Jan. 6, 2015, 1:39 p.m. (2015-01-06 13:39:11 UTC) #31
Eric
Jan. 6, 2015, 5:10 p.m. (2015-01-06 17:10:34 UTC) #32
http://codereview.adblockplus.org/5171515343503360/diff/5679846214598656/src/...
File src/plugin/PluginWbPassThrough.cpp (right):

http://codereview.adblockplus.org/5171515343503360/diff/5679846214598656/src/...
src/plugin/PluginWbPassThrough.cpp:158: if (mimeType.IsEmpty() && domain.empty()
&& AdblockPlus::IE::InstalledMajorVersion() >= 8)
On 2015/01/06 13:39:11, sergei wrote:
> Actually we are supporting only versions starting from 8, so this version
check
> is not necessary here.

You and Oleksandr and I had a discussion about this several weeks ago. The
decision made at the time was to leave all the version checks in, because we
were going to continue to allow people to install the plugin on old versions,
even if that meant shooting themselves in the foot.

Regardless, we need to ensure that the plugin does not install on old version of
IE before we simply remove checks that operate at run time.

http://codereview.adblockplus.org/5171515343503360/diff/5679846214598656/test...
File test/RegistryTest.cpp (right):

http://codereview.adblockplus.org/5171515343503360/diff/5679846214598656/test...
test/RegistryTest.cpp:45: // IE_Version
On 2015/01/06 13:39:11, sergei wrote:
> The tests below should be in IE_versionTest.cpp

OK. I'll do it in a later change. We need to move the registry and IE version
classes into a library shared by both the plugin/engine and the installer. We
don't currently have such a library in our build system.

http://codereview.adblockplus.org/5171515343503360/diff/5679846214598656/test...
test/RegistryTest.cpp:52: #define exact(x) exact_##x
On 2015/01/06 13:39:11, sergei wrote:
> What is the aim of it?
> 
> I would remove it.

Ordinarily unit tests should always run independent of the system that they're
installed on. Unfortunately that can't work for testing the installed version of
IE, since the relevant data is held in system-global variable in the registry.

These definitions allow a working copy to adapt these unit tests to local
conditions.

Powered by Google App Engine
This is Rietveld