Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Side by Side Diff: chrome/browser/component_updater/component_updater_service.h

Issue 321473003: Elevated install of recovery component (component update part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h"
12 #include "base/files/file_path.h"
11 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
12 #include "base/version.h" 14 #include "base/version.h"
13 #include "url/gurl.h" 15 #include "url/gurl.h"
14 16
15 class ComponentsUI; 17 class ComponentsUI;
16 18
17 namespace base { 19 namespace base {
18 class DictionaryValue; 20 class DictionaryValue;
19 class FilePath;
20 } 21 }
21 22
22 namespace net { 23 namespace net {
23 class URLRequestContextGetter; 24 class URLRequestContextGetter;
24 class URLRequest; 25 class URLRequest;
25 } 26 }
26 27
27 namespace content { 28 namespace content {
28 class ResourceThrottle; 29 class ResourceThrottle;
29 } 30 }
(...skipping 13 matching lines...) Expand all
43 // value which is only meaningful to the component updater. 44 // value which is only meaningful to the component updater.
44 virtual void OnUpdateError(int error) = 0; 45 virtual void OnUpdateError(int error) = 0;
45 46
46 // Called by the component updater when a component has been unpacked 47 // Called by the component updater when a component has been unpacked
47 // and is ready to be installed. |manifest| contains the CRX manifest 48 // and is ready to be installed. |manifest| contains the CRX manifest
48 // json dictionary and |unpack_path| contains the temporary directory 49 // json dictionary and |unpack_path| contains the temporary directory
49 // with all the unpacked CRX files. 50 // with all the unpacked CRX files.
50 virtual bool Install(const base::DictionaryValue& manifest, 51 virtual bool Install(const base::DictionaryValue& manifest,
51 const base::FilePath& unpack_path) = 0; 52 const base::FilePath& unpack_path) = 0;
52 53
54 // Returns the path to save installer source information.
55 virtual base::FilePath GetBackupPath() const = 0;
56
57 // Called by the component updater to do install externally (not managed
58 // by the component updater). Installer should retry install with the
59 // CRX files saved in the backup path.
60 virtual void InstallExternally() = 0;
61
53 // Set |installed_file| to the full path to the installed |file|. |file| is 62 // Set |installed_file| to the full path to the installed |file|. |file| is
54 // the filename of the file in this component's CRX. Returns false if this is 63 // the filename of the file in this component's CRX. Returns false if this is
55 // not possible (the file has been removed or modified, or its current 64 // not possible (the file has been removed or modified, or its current
56 // location is unknown). Otherwise, returns true. 65 // location is unknown). Otherwise, returns true.
57 virtual bool GetInstalledFile(const std::string& file, 66 virtual bool GetInstalledFile(const std::string& file,
58 base::FilePath* installed_file) = 0; 67 base::FilePath* installed_file) = 0;
59 68
60 virtual ~ComponentInstaller() {} 69 virtual ~ComponentInstaller() {}
61 }; 70 };
62 71
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 const std::string& component_id) = 0; 220 const std::string& component_id) = 0;
212 }; 221 };
213 222
214 // Creates the component updater. You must pass a valid |config| allocated on 223 // Creates the component updater. You must pass a valid |config| allocated on
215 // the heap which the component updater will own. 224 // the heap which the component updater will own.
216 ComponentUpdateService* ComponentUpdateServiceFactory(Configurator* config); 225 ComponentUpdateService* ComponentUpdateServiceFactory(Configurator* config);
217 226
218 } // namespace component_updater 227 } // namespace component_updater
219 228
220 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ 229 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/component_unpacker.cc ('k') | chrome/browser/component_updater/default_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698