Chromium Code Reviews| Index: chrome/browser/component_updater/component_updater_service.h |
| =================================================================== |
| --- chrome/browser/component_updater/component_updater_service.h (revision 201835) |
| +++ chrome/browser/component_updater/component_updater_service.h (working copy) |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/files/file_path.h" |
| #include "base/version.h" |
| #include "googleurl/src/gurl.h" |
| @@ -20,6 +21,8 @@ |
| class FilePath; |
|
cpu_(ooo_6.6-7.5)
2013/05/29 20:13:58
note filepath is fwd declared here.
waffles
2013/06/13 20:55:04
Done.
|
| } |
| +class ComponentPatcher; |
| + |
| // Component specific installers must derive from this class and implement |
| // OnUpdateError() and Install(). A valid instance of this class must be |
| // given to ComponentUpdateService::RegisterComponent(). |
| @@ -37,6 +40,13 @@ |
| virtual bool Install(const base::DictionaryValue& manifest, |
| const base::FilePath& unpack_path) = 0; |
| + // Set |installed_file| to the full path to the installed |file|. |file| is |
| + // the filename of the file in this component's CRX. Returns false if this is |
| + // not possible (the file has been removed or modified, or its current |
| + // location is unknown). Otherwise, returns true. |
| + virtual bool GetInstalledFile(const std::string& file, |
| + base::FilePath* installed_file) = 0; |
| + |
| protected: |
| virtual ~ComponentInstaller() {} |
| }; |
| @@ -55,12 +65,13 @@ |
| enum UrlSource { |
| BANDAID, |
| CWS_PUBLIC, |
| - CWS_SANDBOX |
| + CWS_SANDBOX, |
| }; |
| std::vector<uint8> pk_hash; |
| ComponentInstaller* installer; |
| Version version; |
| + std::string fingerprint; |
|
cpu_(ooo_6.6-7.5)
2013/05/29 20:13:58
if they have to provide the fingerprint, could thi
waffles
2013/06/13 20:55:04
The fingerprint uniquely identifies the installed
|
| std::string name; |
| UrlSource source; |
| CrxComponent(); |
| @@ -116,6 +127,8 @@ |
| virtual int OnDemandDelay() = 0; |
| // The url that is going to be used update checks over Omaha protocol. |
| virtual GURL UpdateUrl(CrxComponent::UrlSource source) = 0; |
| + // The url where the completion pings are sent. |
| + virtual GURL PingUrl() = 0; |
|
cpu_(ooo_6.6-7.5)
2013/05/29 20:13:58
hmmm, I already receive complains about undue QPS
waffles
2013/06/13 20:55:04
We've addressed this out of band. For the record,
|
| // 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. |
| @@ -128,6 +141,13 @@ |
| // 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; |
| + // True means that this client can handle delta updates. |
| + virtual bool DeltasEnabled() const = 0; |
| + // True means this client is allowed to send component update status pings. |
| + virtual bool PingsEnabled() const = 0; |
| }; |
| // Start doing update checks and installing new versions of registered |