Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: chrome/installer/util/compat_checks.cc

Issue 300593002: Make omaha, gcapi and uninstall registry accesses use Wow6432Node on 64-bit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move the uninstall registry access to 32-bit Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/util/compat_checks.h" 5 #include "chrome/installer/util/compat_checks.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/win/registry.h" 10 #include "base/win/registry.h"
11 11
12 namespace { 12 namespace {
13 13
14 // SEP stands for Symantec End Point Protection. 14 // SEP stands for Symantec End Point Protection.
15 std::wstring GetSEPVersion() { 15 std::wstring GetSEPVersion() {
16 const wchar_t kProductKey[] = 16 const wchar_t kProductKey[] =
17 L"SOFTWARE\\Symantec\\Symantec Endpoint Protection\\SMC"; 17 L"SOFTWARE\\Symantec\\Symantec Endpoint Protection\\SMC";
18 base::win::RegKey key(HKEY_LOCAL_MACHINE, kProductKey, KEY_READ); 18 base::win::RegKey key(HKEY_LOCAL_MACHINE, kProductKey,
19 KEY_READ | KEY_WOW64_32KEY);
grt (UTC plus 2) 2014/05/27 16:42:08 won't this miss if Symantec ever ships a 64-bit SE
Will Harris 2014/05/27 19:25:10 We're only checking for anything before 11MR3, whi
grt (UTC plus 2) 2014/05/27 22:06:19 groovy. sounds like good info for a comment in the
Will Harris 2014/05/27 22:29:28 Done.
19 std::wstring version_str; 20 std::wstring version_str;
20 key.ReadValue(L"ProductVersion", &version_str); 21 key.ReadValue(L"ProductVersion", &version_str);
21 return version_str; 22 return version_str;
22 } 23 }
23 24
24 // The product version should be a string like "11.0.3001.2224". This function 25 // The product version should be a string like "11.0.3001.2224". This function
25 // returns as params the first 3 values. Return value is false if anything 26 // returns as params the first 3 values. Return value is false if anything
26 // does not fit the format. 27 // does not fit the format.
27 bool ParseSEPVersion(const std::wstring& version, int* v0, int* v1, int* v2) { 28 bool ParseSEPVersion(const std::wstring& version, int* v0, int* v1, int* v2) {
28 std::vector<std::wstring> v; 29 std::vector<std::wstring> v;
(...skipping 22 matching lines...) Expand all
51 52
52 } // namespace 53 } // namespace
53 54
54 bool HasIncompatibleSymantecEndpointVersion(const wchar_t* version) { 55 bool HasIncompatibleSymantecEndpointVersion(const wchar_t* version) {
55 int v0, v1, v2; 56 int v0, v1, v2;
56 std::wstring ver_str(version ? version : GetSEPVersion()); 57 std::wstring ver_str(version ? version : GetSEPVersion());
57 if (!ParseSEPVersion(ver_str, &v0, &v1, &v2)) 58 if (!ParseSEPVersion(ver_str, &v0, &v1, &v2))
58 return false; 59 return false;
59 return IsBadSEPVersion(v0, v1, v2); 60 return IsBadSEPVersion(v0, v1, v2);
60 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698