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

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

Issue 300843013: Install and launch kiosk app from cached crx file at start up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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..756ebe02125744df08d53380c326ac7236fecf9d 100644
--- a/chrome/browser/chromeos/extensions/external_cache.h
+++ b/chrome/browser/chromeos/extensions/external_cache.h
@@ -103,6 +103,9 @@ class ExternalCache : public content::NotificationObserver,
virtual bool GetExtensionExistingVersion(const std::string& id,
std::string* version) OVERRIDE;
+ // Returns true if the extension with |id| is pending for update check.
+ bool IsExtensionPendingForUpdateCheck(const std::string& id);
xiyuan 2014/05/29 19:49:01 Move this under IsExtensionPending so that it has
jennyz 2014/07/07 21:11:12 Since this one is not virtual, so I won't put it u
+
// Shut down the cache. The |callback| will be invoked when the cache has shut
// down completely and there are no more pending file I/O operations.
void Shutdown(const base::Closure& callback);
@@ -128,6 +131,12 @@ class ExternalCache : public content::NotificationObserver,
std::string* version);
private:
+ enum ExtensionStatus {
+ DOWNLOAD_PENDING,
+ DOWNLOAD_SUCCEEDED,
+ DOWNLOAD_FAILED,
+ };
+
// Notifies the that the cache has been updated, providing
// extensions loader with an updated list of extensions.
void UpdateExtensionLoader();
@@ -164,6 +173,9 @@ class ExternalCache : public content::NotificationObserver,
// and that have a valid crx in the cache.
scoped_ptr<base::DictionaryValue> cached_extensions_;
+ // <extension_id : status>: used for tracking extension download status.
+ std::map<std::string, ExtensionStatus> extensions_status_;
+
// Used to download the extensions and to check for updates.
scoped_ptr<extensions::ExtensionDownloader> downloader_;

Powered by Google App Engine
This is Rietveld 408576698