| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_elf/chrome_elf_util.h" | 5 #include "chrome/install_static/install_util.h" |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 | 13 |
| 14 ProcessType g_process_type = ProcessType::UNINITIALIZED; | 14 ProcessType g_process_type = ProcessType::UNINITIALIZED; |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 const wchar_t kRegPathClientState[] = L"Software\\Google\\Update\\ClientState"; | 18 const wchar_t kRegPathClientState[] = L"Software\\Google\\Update\\ClientState"; |
| 19 const wchar_t kRegPathClientStateMedium[] = | 19 const wchar_t kRegPathClientStateMedium[] = |
| 20 L"Software\\Google\\Update\\ClientStateMedium"; | 20 L"Software\\Google\\Update\\ClientStateMedium"; |
| 21 #if defined(GOOGLE_CHROME_BUILD) | 21 #if defined(GOOGLE_CHROME_BUILD) |
| 22 const wchar_t kRegPathChromePolicy[] = L"SOFTWARE\\Policies\\Google\\Chrome"; | 22 const wchar_t kRegPathChromePolicy[] = L"SOFTWARE\\Policies\\Google\\Chrome"; |
| 23 #else | 23 #else |
| 24 const wchar_t kRegPathChromePolicy[] = L"SOFTWARE\\Policies\\Chromium"; | 24 const wchar_t kRegPathChromePolicy[] = L"SOFTWARE\\Policies\\Chromium"; |
| 25 #endif // defined(GOOGLE_CHROME_BUILD) | 25 #endif // defined(GOOGLE_CHROME_BUILD) |
| 26 | 26 |
| 27 const wchar_t kRegValueUsageStats[] = L"usagestats"; | 27 const wchar_t kRegValueUsageStats[] = L"usagestats"; |
| 28 const wchar_t kUninstallArgumentsField[] = L"UninstallArguments"; | 28 const wchar_t kUninstallArgumentsField[] = L"UninstallArguments"; |
| 29 const wchar_t kMetricsReportingEnabled[] =L"MetricsReportingEnabled"; | 29 const wchar_t kMetricsReportingEnabled[] = L"MetricsReportingEnabled"; |
| 30 | 30 |
| 31 const wchar_t kAppGuidCanary[] = | 31 const wchar_t kAppGuidCanary[] = |
| 32 L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}"; | 32 L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}"; |
| 33 const wchar_t kAppGuidGoogleChrome[] = | 33 const wchar_t kAppGuidGoogleChrome[] = |
| 34 L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; | 34 L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; |
| 35 const wchar_t kAppGuidGoogleBinaries[] = | 35 const wchar_t kAppGuidGoogleBinaries[] = |
| 36 L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}"; | 36 L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}"; |
| 37 | 37 |
| 38 bool ReadKeyValueString(bool system_install, const wchar_t* key_path, | 38 bool ReadKeyValueString(bool system_install, const wchar_t* key_path, |
| 39 const wchar_t* guid, const wchar_t* value_to_read, | 39 const wchar_t* guid, const wchar_t* value_to_read, |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 return; | 215 return; |
| 216 } | 216 } |
| 217 | 217 |
| 218 g_process_type = ProcessType::BROWSER_PROCESS; | 218 g_process_type = ProcessType::BROWSER_PROCESS; |
| 219 } | 219 } |
| 220 | 220 |
| 221 bool IsNonBrowserProcess() { | 221 bool IsNonBrowserProcess() { |
| 222 assert(g_process_type != ProcessType::UNINITIALIZED); | 222 assert(g_process_type != ProcessType::UNINITIALIZED); |
| 223 return g_process_type == ProcessType::NON_BROWSER_PROCESS; | 223 return g_process_type == ProcessType::NON_BROWSER_PROCESS; |
| 224 } | 224 } |
| OLD | NEW |