Chromium Code Reviews| Index: chrome/browser/component_updater/component_updater_service.h |
| diff --git a/chrome/browser/component_updater/component_updater_service.h b/chrome/browser/component_updater/component_updater_service.h |
| index de1748bdd947b259970be3bfe1423fe3bb4c4591..b80c70a918f836d47002f689d08bdb11e38c3a64 100644 |
| --- a/chrome/browser/component_updater/component_updater_service.h |
| +++ b/chrome/browser/component_updater/component_updater_service.h |
| @@ -11,15 +11,19 @@ |
| #include "base/version.h" |
| #include "url/gurl.h" |
| -namespace net { |
| -class URLRequestContextGetter; |
| -} |
| - |
| namespace base { |
| class DictionaryValue; |
| class FilePath; |
| } |
| +namespace component_updater { |
| +class ComponentUpdaterServiceObserver; |
| +} |
| + |
| +namespace net { |
| +class URLRequestContextGetter; |
| +} |
| + |
| class ComponentPatcher; |
| // Component specific installers must derive from this class and implement |
| @@ -91,16 +95,8 @@ class ComponentUpdateService { |
| // Controls the component updater behavior. |
| class Configurator { |
| public: |
| - enum Events { |
| - kManifestCheck, |
| - kComponentUpdated, |
| - kManifestError, |
| - kNetworkError, |
| - kUnpackError, |
| - kInstallerError |
| - }; |
| - |
| virtual ~Configurator() {} |
| + virtual void Init(ComponentUpdateService* cus) = 0; |
| // Delay in seconds from calling Start() to the first update check. |
| virtual int InitialDelay() = 0; |
| // Delay in seconds to every subsequent update check. 0 means don't check. |
| @@ -114,6 +110,9 @@ class ComponentUpdateService { |
| virtual int OnDemandDelay() = 0; |
| // The url that is going to be used update checks over Omaha protocol. |
| virtual GURL UpdateUrl() = 0; |
| + // The url where the completion pings are sent. Invalid if and only if |
| + // pings are disabled. |
| + virtual GURL PingUrl() = 0; |
| // Parameters added to each url request. It can be null if none are needed. |
| virtual const char* ExtraRequestParams() = 0; |
| // How big each update request can be. Don't go above 2000. |
| @@ -122,10 +121,6 @@ class ComponentUpdateService { |
| virtual net::URLRequestContextGetter* RequestContext() = 0; |
| // True means that all ops are performed in this process. |
| virtual bool InProcess() = 0; |
| - // The component updater will call this function when an interesting event |
| - // happens. It should be used mostly as a place to add application specific |
| - // logging or telemetry. |extra| is |event| dependent. |
| - virtual void OnEvent(Events event, int extra) = 0; |
| // Creates a new ComponentPatcher in a platform-specific way. This is useful |
| // for dependency injection. |
| virtual ComponentPatcher* CreateComponentPatcher() = 0; |
| @@ -156,6 +151,14 @@ class ComponentUpdateService { |
| // via the Install() hook. |
| virtual Status CheckForUpdateSoon(const CrxComponent& component) = 0; |
| + // Adds or removes observers for this class. The caller of this class |
| + // still maintains ownership of the observer, and it is responsible for |
| + // removing and destroying the observer when the observer is not needed. |
|
waffles
2013/07/16 22:47:13
What is the purpose of the returned status? We don
Sorin Jianu
2013/07/16 22:52:47
To be consistent with the other methods in the int
|
| + virtual Status AddObserver( |
| + component_updater::ComponentUpdaterServiceObserver* observer) = 0; |
| + virtual Status RemoveObserver( |
| + component_updater::ComponentUpdaterServiceObserver* observer) = 0; |
| + |
| virtual ~ComponentUpdateService() {} |
| }; |