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

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

Issue 334783002: Componentize component_updater: Move some paths/constants to component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge origin/master Created 6 years, 6 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
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // |pk_hash| is the SHA256 hash of the component's public key. If the component 64 // |pk_hash| is the SHA256 hash of the component's public key. If the component
65 // is to be installed then version should be "0" or "0.0", else it should be 65 // is to be installed then version should be "0" or "0.0", else it should be
66 // the current version. |fingerprint|, and |name| are optional. 66 // the current version. |fingerprint|, and |name| are optional.
67 // |allow_background_download| specifies that the component can be background 67 // |allow_background_download| specifies that the component can be background
68 // downloaded in some cases. The default for this value is |true| and the value 68 // downloaded in some cases. The default for this value is |true| and the value
69 // can be overriden at the registration time. This is a temporary change until 69 // can be overriden at the registration time. This is a temporary change until
70 // the issue 340448 is resolved. 70 // the issue 340448 is resolved.
71 struct CrxComponent { 71 struct CrxComponent {
72 std::vector<uint8> pk_hash; 72 std::vector<uint8> pk_hash;
73 ComponentInstaller* installer; 73 ComponentInstaller* installer;
74 Version version; 74 base::Version version;
75 std::string fingerprint; 75 std::string fingerprint;
76 std::string name; 76 std::string name;
77 bool allow_background_download; 77 bool allow_background_download;
78 CrxComponent(); 78 CrxComponent();
79 ~CrxComponent(); 79 ~CrxComponent();
80 }; 80 };
81 81
82 struct CrxUpdateItem; 82 struct CrxUpdateItem;
83 83
84 // The component update service is in charge of installing or upgrading 84 // The component update service is in charge of installing or upgrading
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // the update will be applied. The caller can subscribe to component update 243 // the update will be applied. The caller can subscribe to component update
244 // service notifications to get an indication about the outcome of the 244 // service notifications to get an indication about the outcome of the
245 // on-demand update. The function does not implement any cooldown interval. 245 // on-demand update. The function does not implement any cooldown interval.
246 virtual ComponentUpdateService::Status OnDemandUpdate( 246 virtual ComponentUpdateService::Status OnDemandUpdate(
247 const std::string& component_id) = 0; 247 const std::string& component_id) = 0;
248 }; 248 };
249 249
250 // Creates the component updater. You must pass a valid |config| allocated on 250 // Creates the component updater. You must pass a valid |config| allocated on
251 // the heap which the component updater will own. 251 // the heap which the component updater will own.
252 ComponentUpdateService* ComponentUpdateServiceFactory( 252 ComponentUpdateService* ComponentUpdateServiceFactory(
253 ComponentUpdateService::Configurator* config); 253 ComponentUpdateService::Configurator* config,
254 const std::string& application_version,
Sorin Jianu 2014/06/19 00:48:22 we can get rid of the members if we can make them
255 const std::string& platform_name);
254 } // namespace component_updater 256 } // namespace component_updater
255 257
256 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ 258 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698