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 3ac645d8a0b0b4f7041aa6fb484680e0369878bd..1303038119034cc1589de1eac015ba416440913a 100644 |
--- a/chrome/browser/component_updater/component_updater_service.h |
+++ b/chrome/browser/component_updater/component_updater_service.h |
@@ -20,6 +20,8 @@ class DictionaryValue; |
class FilePath; |
} |
+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 +39,13 @@ class ComponentInstaller { |
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 |
cpu_(ooo_6.6-7.5)
2013/06/18 17:02:06
I was expecting as input the version, but I guess
Sorin Jianu
2013/06/18 20:46:39
Done.
|
+ // 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 +64,13 @@ struct CrxComponent { |
enum UrlSource { |
BANDAID, |
CWS_PUBLIC, |
- CWS_SANDBOX |
+ CWS_SANDBOX, |
}; |
std::vector<uint8> pk_hash; |
ComponentInstaller* installer; |
Version version; |
+ std::string fingerprint; |
std::string name; |
UrlSource source; |
CrxComponent(); |
@@ -116,6 +126,9 @@ class ComponentUpdateService { |
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. 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. |
@@ -128,6 +141,11 @@ class ComponentUpdateService { |
// 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; |
}; |
// Start doing update checks and installing new versions of registered |