| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Delay in seconds from calling Start() to the first update check. | 94 // Delay in seconds from calling Start() to the first update check. |
| 95 virtual int InitialDelay() = 0; | 95 virtual int InitialDelay() = 0; |
| 96 // Delay in seconds to every subsequent update check. 0 means don't check. | 96 // Delay in seconds to every subsequent update check. 0 means don't check. |
| 97 virtual int NextCheckDelay() = 0; | 97 virtual int NextCheckDelay() = 0; |
| 98 // Delay in seconds from each task step. Used to smooth out CPU/IO usage. | 98 // Delay in seconds from each task step. Used to smooth out CPU/IO usage. |
| 99 virtual int StepDelay() = 0; | 99 virtual int StepDelay() = 0; |
| 100 // Minimun delta time in seconds before checking again the same component. | 100 // Minimun delta time in seconds before checking again the same component. |
| 101 virtual int MinimumReCheckWait() = 0; | 101 virtual int MinimumReCheckWait() = 0; |
| 102 // The url that is going to be used update checks over Omaha protocol. | 102 // The url that is going to be used update checks over Omaha protocol. |
| 103 virtual GURL UpdateUrl() = 0; | 103 virtual GURL UpdateUrl() = 0; |
| 104 // Parameters added to each url request. It can be null if none are needed. |
| 105 virtual const char* ExtraRequestParams() = 0; |
| 104 // How big each update request can be. Don't go above 2000. | 106 // How big each update request can be. Don't go above 2000. |
| 105 virtual size_t UrlSizeLimit() = 0; | 107 virtual size_t UrlSizeLimit() = 0; |
| 106 // The source of contexts for all the url requests. | 108 // The source of contexts for all the url requests. |
| 107 virtual net::URLRequestContextGetter* RequestContext() = 0; | 109 virtual net::URLRequestContextGetter* RequestContext() = 0; |
| 108 // True means that all ops are peformed in this process. | 110 // True means that all ops are peformed in this process. |
| 109 virtual bool InProcess() = 0; | 111 virtual bool InProcess() = 0; |
| 110 // The component updater will call this function when an interesting event | 112 // The component updater will call this function when an interesting event |
| 111 // happens. It should be used mostly as a place to add application specific | 113 // happens. It should be used mostly as a place to add application specific |
| 112 // logging or telemetry. |extra| is |event| dependent. | 114 // logging or telemetry. |extra| is |event| dependent. |
| 113 virtual void OnEvent(Events event, int extra) = 0; | 115 virtual void OnEvent(Events event, int extra) = 0; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 128 virtual ~ComponentUpdateService() {} | 130 virtual ~ComponentUpdateService() {} |
| 129 }; | 131 }; |
| 130 | 132 |
| 131 // Creates the component updater. You must pass a valid |config| allocated on | 133 // Creates the component updater. You must pass a valid |config| allocated on |
| 132 // the heap which the component updater will own. | 134 // the heap which the component updater will own. |
| 133 ComponentUpdateService* ComponentUpdateServiceFactory( | 135 ComponentUpdateService* ComponentUpdateServiceFactory( |
| 134 ComponentUpdateService::Configurator* config); | 136 ComponentUpdateService::Configurator* config); |
| 135 | 137 |
| 136 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ | 138 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
| 137 | 139 |
| OLD | NEW |