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..8e8354620a3872e9c09e874a4e2f279c67243e5f 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 |
+ // 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,8 @@ 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. |
+ 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 +140,13 @@ 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; |
+ // 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 |