OLD | NEW |
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/registry.h" | 7 #include "base/registry.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/string_split.h" |
9 #include "base/string_util.h" | 10 #include "base/string_util.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 // SEP stands for Symantec End Point Protection. | 14 // SEP stands for Symantec End Point Protection. |
14 std::wstring GetSEPVersion() { | 15 std::wstring GetSEPVersion() { |
15 const wchar_t kProductKey[] = | 16 const wchar_t kProductKey[] = |
16 L"SOFTWARE\\Symantec\\Symantec Endpoint Protection\\SMC"; | 17 L"SOFTWARE\\Symantec\\Symantec Endpoint Protection\\SMC"; |
17 RegKey key(HKEY_LOCAL_MACHINE, kProductKey, KEY_READ); | 18 RegKey key(HKEY_LOCAL_MACHINE, kProductKey, KEY_READ); |
18 std::wstring version_str; | 19 std::wstring version_str; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 51 |
51 } // namespace | 52 } // namespace |
52 | 53 |
53 bool HasIncompatibleSymantecEndpointVersion(const wchar_t* version) { | 54 bool HasIncompatibleSymantecEndpointVersion(const wchar_t* version) { |
54 int v0, v1, v2; | 55 int v0, v1, v2; |
55 std::wstring ver_str(version ? version : GetSEPVersion()); | 56 std::wstring ver_str(version ? version : GetSEPVersion()); |
56 if (!ParseSEPVersion(ver_str, &v0, &v1, &v2)) | 57 if (!ParseSEPVersion(ver_str, &v0, &v1, &v2)) |
57 return false; | 58 return false; |
58 return IsBadSEPVersion(v0, v1, v2); | 59 return IsBadSEPVersion(v0, v1, v2); |
59 } | 60 } |
OLD | NEW |