OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/component_updater/recovery_component_installer.h" | 5 #include "chrome/browser/component_updater/recovery_component_installer.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/prefs/pref_registry_simple.h" | 15 #include "base/prefs/pref_registry_simple.h" |
16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
17 #include "base/process/launch.h" | 17 #include "base/process/launch.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/values.h" | 19 #include "base/values.h" |
20 #include "chrome/browser/component_updater/component_updater_service.h" | 20 #include "chrome/browser/component_updater/component_updater_service.h" |
21 #include "chrome/common/chrome_version_info.h" | 21 #include "chrome/common/chrome_version_info.h" |
22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 | 24 |
25 using content::BrowserThread; | 25 using content::BrowserThread; |
26 | 26 |
| 27 namespace component_updater { |
| 28 |
27 namespace { | 29 namespace { |
28 | 30 |
29 // CRX hash. The extension id is: npdjjkjlcidkjlamlmmdelcjbcpdjocm. | 31 // CRX hash. The extension id is: npdjjkjlcidkjlamlmmdelcjbcpdjocm. |
30 const uint8 kSha2Hash[] = {0xdf, 0x39, 0x9a, 0x9b, 0x28, 0x3a, 0x9b, 0x0c, | 32 const uint8 kSha2Hash[] = {0xdf, 0x39, 0x9a, 0x9b, 0x28, 0x3a, 0x9b, 0x0c, |
31 0xbc, 0xc3, 0x4b, 0x29, 0x12, 0xf3, 0x9e, 0x2c, | 33 0xbc, 0xc3, 0x4b, 0x29, 0x12, 0xf3, 0x9e, 0x2c, |
32 0x19, 0x7a, 0x71, 0x4b, 0x0a, 0x7c, 0x80, 0x1c, | 34 0x19, 0x7a, 0x71, 0x4b, 0x0a, 0x7c, 0x80, 0x1c, |
33 0xf6, 0x29, 0x7c, 0x0a, 0x5f, 0xea, 0x67, 0xb7}; | 35 0xf6, 0x29, 0x7c, 0x0a, 0x5f, 0xea, 0x67, 0xb7}; |
34 | 36 |
35 // File name of the recovery binary on different platforms. | 37 // File name of the recovery binary on different platforms. |
36 const base::FilePath::CharType kRecoveryFileName[] = | 38 const base::FilePath::CharType kRecoveryFileName[] = |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 BrowserThread::UI, | 149 BrowserThread::UI, |
148 FROM_HERE, | 150 FROM_HERE, |
149 base::Bind(&RecoveryRegisterHelper, cus, prefs), | 151 base::Bind(&RecoveryRegisterHelper, cus, prefs), |
150 base::TimeDelta::FromSeconds(6)); | 152 base::TimeDelta::FromSeconds(6)); |
151 #endif | 153 #endif |
152 } | 154 } |
153 | 155 |
154 void RegisterPrefsForRecoveryComponent(PrefRegistrySimple* registry) { | 156 void RegisterPrefsForRecoveryComponent(PrefRegistrySimple* registry) { |
155 registry->RegisterStringPref(prefs::kRecoveryComponentVersion, "0.0.0.0"); | 157 registry->RegisterStringPref(prefs::kRecoveryComponentVersion, "0.0.0.0"); |
156 } | 158 } |
| 159 |
| 160 } // namespace component_updater |
| 161 |
OLD | NEW |