Index: chrome/browser/chromeos/extensions/external_cache.h |
diff --git a/chrome/browser/chromeos/extensions/external_cache.h b/chrome/browser/chromeos/extensions/external_cache.h |
index 4c0040e72f6f86c861a0e555957c9407c04778dc..52c2247425be3e7afe49d4daa00ef18da3baa933 100644 |
--- a/chrome/browser/chromeos/extensions/external_cache.h |
+++ b/chrome/browser/chromeos/extensions/external_cache.h |
@@ -38,6 +38,9 @@ namespace chromeos { |
class ExternalCache : public content::NotificationObserver, |
public extensions::ExtensionDownloaderDelegate { |
public: |
+ typedef base::Callback<void(const std::string& id, bool success)> |
+ PutExternalExtensionCallback; |
+ |
class Delegate { |
public: |
virtual ~Delegate() {} |
@@ -127,6 +130,13 @@ class ExternalCache : public content::NotificationObserver, |
base::FilePath* file_path, |
std::string* version); |
+ // Puts the external |crx_file_path| into |local_cache_| for extension with |
+ // |id|. |
+ void PutExternalExtension(const std::string& id, |
+ const base::FilePath& crx_file_path, |
+ const std::string& version, |
+ const PutExternalExtensionCallback& callback); |
+ |
private: |
// Notifies the that the cache has been updated, providing |
// extensions loader with an updated list of extensions. |
@@ -140,6 +150,13 @@ class ExternalCache : public content::NotificationObserver, |
const base::FilePath& file_path, |
bool file_ownership_passed); |
+ // Invoked on the UI thread when the external extension has been installed |
+ // in the local cache by calling PutExternalExtension. |
+ void OnPutExternalExtension(const std::string& id, |
+ const PutExternalExtensionCallback& callback, |
+ const base::FilePath& file_path, |
+ bool file_ownership_passed); |
+ |
extensions::LocalExtensionCache local_cache_; |
// Request context used by the |downloader_|. |