Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: chrome/browser/chromeos/extensions/external_cache.h

Issue 491403003: Update cached kiosk app crx from usb stick. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor optimization in test. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_|.
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_external_updater.cc ('k') | chrome/browser/chromeos/extensions/external_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698