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" |
(...skipping 27 matching lines...) Expand all Loading... |
38 #else // OS_LINUX, OS_MACOSX, etc. | 38 #else // OS_LINUX, OS_MACOSX, etc. |
39 FILE_PATH_LITERAL("ChromeRecovery"); | 39 FILE_PATH_LITERAL("ChromeRecovery"); |
40 #endif | 40 #endif |
41 | 41 |
42 const char kRecoveryManifestName[] = "ChromeRecovery"; | 42 const char kRecoveryManifestName[] = "ChromeRecovery"; |
43 | 43 |
44 } // namespace | 44 } // namespace |
45 | 45 |
46 class RecoveryComponentInstaller : public ComponentInstaller { | 46 class RecoveryComponentInstaller : public ComponentInstaller { |
47 public: | 47 public: |
48 explicit RecoveryComponentInstaller(const Version& version, | 48 RecoveryComponentInstaller(const Version& version, |
49 PrefService* prefs); | 49 PrefService* prefs); |
50 | 50 |
51 virtual ~RecoveryComponentInstaller() {} | 51 virtual ~RecoveryComponentInstaller() {} |
52 | 52 |
53 virtual void OnUpdateError(int error) OVERRIDE; | 53 virtual void OnUpdateError(int error) OVERRIDE; |
54 | 54 |
55 virtual bool Install(base::DictionaryValue* manifest, | 55 virtual bool Install(base::DictionaryValue* manifest, |
56 const FilePath& unpack_path) OVERRIDE; | 56 const FilePath& unpack_path) OVERRIDE; |
57 | 57 |
58 private: | 58 private: |
59 Version current_version_; | 59 Version current_version_; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 #if !defined(OS_CHROMEOS) | 138 #if !defined(OS_CHROMEOS) |
139 // We delay execute the registration because we are not required in | 139 // We delay execute the registration because we are not required in |
140 // the critical path during browser startup. | 140 // the critical path during browser startup. |
141 BrowserThread::PostDelayedTask( | 141 BrowserThread::PostDelayedTask( |
142 BrowserThread::UI, | 142 BrowserThread::UI, |
143 FROM_HERE, | 143 FROM_HERE, |
144 base::Bind(&RecoveryRegisterHelper, cus, prefs), | 144 base::Bind(&RecoveryRegisterHelper, cus, prefs), |
145 base::TimeDelta::FromSeconds(6)); | 145 base::TimeDelta::FromSeconds(6)); |
146 #endif | 146 #endif |
147 } | 147 } |
OLD | NEW |