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

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

Issue 318143003: Make CUS interface more resilient by returning a copy of the data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_updater_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Returns a list of registered components. 200 // Returns a list of registered components.
201 virtual std::vector<std::string> GetComponentIDs() const = 0; 201 virtual std::vector<std::string> GetComponentIDs() const = 0;
202 202
203 // Returns an interface for on-demand updates. On-demand updates are 203 // Returns an interface for on-demand updates. On-demand updates are
204 // proactively triggered outside the normal component update service schedule. 204 // proactively triggered outside the normal component update service schedule.
205 virtual OnDemandUpdater& GetOnDemandUpdater() = 0; 205 virtual OnDemandUpdater& GetOnDemandUpdater() = 0;
206 206
207 virtual ~ComponentUpdateService() {} 207 virtual ~ComponentUpdateService() {}
208 208
209 private: 209 private:
210 // Returns details about registered component. The object returned is owned 210 // Returns details about registered component in the |item| parameter. The
211 // by this class. TODO(sorin): replace with a WeakPtr. 211 // function returns true in case of success and false in case of errors.
212 virtual CrxUpdateItem* GetComponentDetails( 212 virtual bool GetComponentDetails(const std::string& component_id,
213 const std::string& component_id) const = 0; 213 CrxUpdateItem* item) const = 0;
214 214
215 friend class ::ComponentsUI; 215 friend class ::ComponentsUI;
216 FRIEND_TEST_ALL_PREFIXES(ComponentUpdaterTest, ResourceThrottleLiveNoUpdate); 216 FRIEND_TEST_ALL_PREFIXES(ComponentUpdaterTest, ResourceThrottleLiveNoUpdate);
217 }; 217 };
218 218
219 typedef ComponentUpdateService::Observer ServiceObserver; 219 typedef ComponentUpdateService::Observer ServiceObserver;
220 220
221 class OnDemandUpdater { 221 class OnDemandUpdater {
222 public: 222 public:
223 virtual ~OnDemandUpdater() {} 223 virtual ~OnDemandUpdater() {}
(...skipping 23 matching lines...) Expand all
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 } // namespace component_updater 254 } // namespace component_updater
255 255
256 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ 256 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_updater_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698