OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/install_static/install_modes.h" | 5 #include "chrome/install_static/install_modes.h" |
6 | 6 |
7 namespace install_static { | 7 namespace install_static { |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 std::wstring GetUnregisteredKeyPathForProduct(const wchar_t* product) { | 11 std::wstring GetUnregisteredKeyPathForProduct(const wchar_t* product) { |
12 return std::wstring(L"Software\\").append(product); | 12 return std::wstring(L"Software\\").append(product); |
13 } | 13 } |
14 | 14 |
| 15 std::wstring GetClientsKeyPathForApp(const wchar_t* app_guid) { |
| 16 return std::wstring(L"Software\\Google\\Update\\Clients\\").append(app_guid); |
| 17 } |
| 18 |
15 std::wstring GetClientStateKeyPathForApp(const wchar_t* app_guid) { | 19 std::wstring GetClientStateKeyPathForApp(const wchar_t* app_guid) { |
16 return std::wstring(L"Software\\Google\\Update\\ClientState\\") | 20 return std::wstring(L"Software\\Google\\Update\\ClientState\\") |
17 .append(app_guid); | 21 .append(app_guid); |
18 } | 22 } |
19 | 23 |
20 std::wstring GetClientStateMediumKeyPathForApp(const wchar_t* app_guid) { | 24 std::wstring GetClientStateMediumKeyPathForApp(const wchar_t* app_guid) { |
21 return std::wstring(L"Software\\Google\\Update\\ClientStateMedium\\") | 25 return std::wstring(L"Software\\Google\\Update\\ClientStateMedium\\") |
22 .append(app_guid); | 26 .append(app_guid); |
23 } | 27 } |
24 | 28 |
25 } // namespace | 29 } // namespace |
26 | 30 |
| 31 std::wstring GetClientsKeyPath(const wchar_t* app_guid) { |
| 32 if (!kUseGoogleUpdateIntegration) |
| 33 return GetUnregisteredKeyPathForProduct(kProductPathName); |
| 34 return GetClientsKeyPathForApp(app_guid); |
| 35 } |
| 36 |
27 std::wstring GetClientStateKeyPath(const wchar_t* app_guid) { | 37 std::wstring GetClientStateKeyPath(const wchar_t* app_guid) { |
28 if (!kUseGoogleUpdateIntegration) | 38 if (!kUseGoogleUpdateIntegration) |
29 return GetUnregisteredKeyPathForProduct(kProductPathName); | 39 return GetUnregisteredKeyPathForProduct(kProductPathName); |
30 return GetClientStateKeyPathForApp(app_guid); | 40 return GetClientStateKeyPathForApp(app_guid); |
31 } | 41 } |
32 | 42 |
| 43 std::wstring GetBinariesClientsKeyPath() { |
| 44 if (!kUseGoogleUpdateIntegration) |
| 45 return GetUnregisteredKeyPathForProduct(kBinariesPathName); |
| 46 return GetClientsKeyPathForApp(kBinariesAppGuid); |
| 47 } |
| 48 |
33 std::wstring GetBinariesClientStateKeyPath() { | 49 std::wstring GetBinariesClientStateKeyPath() { |
34 if (!kUseGoogleUpdateIntegration) | 50 if (!kUseGoogleUpdateIntegration) |
35 return GetUnregisteredKeyPathForProduct(kBinariesPathName); | 51 return GetUnregisteredKeyPathForProduct(kBinariesPathName); |
36 return GetClientStateKeyPathForApp(kBinariesAppGuid); | 52 return GetClientStateKeyPathForApp(kBinariesAppGuid); |
37 } | 53 } |
38 | 54 |
39 std::wstring GetClientStateMediumKeyPath(const wchar_t* app_guid) { | 55 std::wstring GetClientStateMediumKeyPath(const wchar_t* app_guid) { |
40 if (!kUseGoogleUpdateIntegration) | 56 if (!kUseGoogleUpdateIntegration) |
41 return GetUnregisteredKeyPathForProduct(kProductPathName); | 57 return GetUnregisteredKeyPathForProduct(kProductPathName); |
42 return GetClientStateMediumKeyPathForApp(app_guid); | 58 return GetClientStateMediumKeyPathForApp(app_guid); |
43 } | 59 } |
44 | 60 |
45 std::wstring GetBinariesClientStateMediumKeyPath() { | 61 std::wstring GetBinariesClientStateMediumKeyPath() { |
46 if (!kUseGoogleUpdateIntegration) | 62 if (!kUseGoogleUpdateIntegration) |
47 return GetUnregisteredKeyPathForProduct(kBinariesPathName); | 63 return GetUnregisteredKeyPathForProduct(kBinariesPathName); |
48 return GetClientStateMediumKeyPathForApp(kBinariesAppGuid); | 64 return GetClientStateMediumKeyPathForApp(kBinariesAppGuid); |
49 } | 65 } |
50 | 66 |
51 } // namespace install_static | 67 } // namespace install_static |
OLD | NEW |