| 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 #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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  183  |  183  | 
|  184   // Add component to be checked for updates. You can call this method |  184   // Add component to be checked for updates. You can call this method | 
|  185   // before calling Start(). |  185   // before calling Start(). | 
|  186   virtual Status RegisterComponent(const CrxComponent& component) = 0; |  186   virtual Status RegisterComponent(const CrxComponent& component) = 0; | 
|  187  |  187  | 
|  188   // Returns a list of registered components. |  188   // Returns a list of registered components. | 
|  189   virtual void GetComponents(std::vector<CrxComponentInfo>* components) = 0; |  189   virtual void GetComponents(std::vector<CrxComponentInfo>* components) = 0; | 
|  190  |  190  | 
|  191   virtual ~ComponentUpdateService() {} |  191   virtual ~ComponentUpdateService() {} | 
|  192  |  192  | 
|  193   // TODO(waffles): Remove PNaCl as a friend once an alternative on-demand |  | 
|  194   // trigger is available. |  | 
|  195   friend class ComponentsUI; |  193   friend class ComponentsUI; | 
|  196   friend class PnaclComponentInstaller; |  | 
|  197   friend class OnDemandTester; |  194   friend class OnDemandTester; | 
|  198  |  195  | 
|  199  private: |  196  private: | 
|  200   // Ask the component updater to do an update check for a previously |  197   // Ask the component updater to do an update check for a previously | 
|  201   // registered component, immediately. If an update or check is already |  198   // registered component, immediately. If an update or check is already | 
|  202   // in progress, returns |kInProgress|. |  199   // in progress, returns |kInProgress|. | 
|  203   // There is no guarantee that the item will actually be updated, |  200   // There is no guarantee that the item will actually be updated, | 
|  204   // since an update may not be available. Listeners for the component will |  201   // since an update may not be available. Listeners for the component will | 
|  205   // know the outcome of the check. |  202   // know the outcome of the check. | 
|  206   virtual Status OnDemandUpdate(const std::string& component_id) = 0; |  203   virtual Status OnDemandUpdate(const std::string& component_id) = 0; | 
|  207 }; |  204 }; | 
|  208  |  205  | 
|  209 // Creates the component updater. You must pass a valid |config| allocated on |  206 // Creates the component updater. You must pass a valid |config| allocated on | 
|  210 // the heap which the component updater will own. |  207 // the heap which the component updater will own. | 
|  211 ComponentUpdateService* ComponentUpdateServiceFactory( |  208 ComponentUpdateService* ComponentUpdateServiceFactory( | 
|  212     ComponentUpdateService::Configurator* config); |  209     ComponentUpdateService::Configurator* config); | 
|  213  |  210  | 
|  214 #endif  // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |  211 #endif  // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ | 
| OLD | NEW |