OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_path.h" | 11 #include "base/file_path.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.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/process_util.h" | 15 #include "base/process_util.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/browser/component_updater/component_updater_service.h" | 18 #include "chrome/browser/component_updater/component_updater_service.h" |
19 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
20 #include "chrome/common/chrome_version_info.h" | 20 #include "chrome/common/chrome_version_info.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 | 23 |
| 24 using content::BrowserThread; |
| 25 |
24 namespace { | 26 namespace { |
25 | 27 |
26 // CRX hash. The extension id is: npdjjkjlcidkjlamlmmdelcjbcpdjocm. | 28 // CRX hash. The extension id is: npdjjkjlcidkjlamlmmdelcjbcpdjocm. |
27 const uint8 sha2_hash[] = {0xdf, 0x39, 0x9a, 0x9b, 0x28, 0x3a, 0x9b, 0x0c, | 29 const uint8 sha2_hash[] = {0xdf, 0x39, 0x9a, 0x9b, 0x28, 0x3a, 0x9b, 0x0c, |
28 0xbc, 0xc3, 0x4b, 0x29, 0x12, 0xf3, 0x9e, 0x2c, | 30 0xbc, 0xc3, 0x4b, 0x29, 0x12, 0xf3, 0x9e, 0x2c, |
29 0x19, 0x7a, 0x71, 0x4b, 0x0a, 0x7c, 0x80, 0x1c, | 31 0x19, 0x7a, 0x71, 0x4b, 0x0a, 0x7c, 0x80, 0x1c, |
30 0xf6, 0x29, 0x7c, 0x0a, 0x5f, 0xea, 0x67, 0xb7}; | 32 0xf6, 0x29, 0x7c, 0x0a, 0x5f, 0xea, 0x67, 0xb7}; |
31 | 33 |
32 // File name of the recovery binary on different platforms. | 34 // File name of the recovery binary on different platforms. |
33 const FilePath::CharType kRecoveryFileName[] = | 35 const FilePath::CharType kRecoveryFileName[] = |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 131 |
130 void RegisterRecoveryComponent(ComponentUpdateService* cus, | 132 void RegisterRecoveryComponent(ComponentUpdateService* cus, |
131 PrefService* prefs) { | 133 PrefService* prefs) { |
132 #if !defined(OS_CHROMEOS) | 134 #if !defined(OS_CHROMEOS) |
133 // We delay execute the registration because we are not required in | 135 // We delay execute the registration because we are not required in |
134 // the critical path during browser startup. | 136 // the critical path during browser startup. |
135 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, | 137 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, |
136 base::Bind(&RecoveryRegisterHelper, cus, prefs), 6000); | 138 base::Bind(&RecoveryRegisterHelper, cus, prefs), 6000); |
137 #endif | 139 #endif |
138 } | 140 } |
OLD | NEW |