Index: chrome/browser/chromeos/app_mode/kiosk_app_manager.h |
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.h b/chrome/browser/chromeos/app_mode/kiosk_app_manager.h |
index 30caf1207a24510a393a33ff1eaa223580afbab1..b9a3c9bee2607388a24aa58b2109321105c6db47 100644 |
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.h |
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.h |
@@ -37,6 +37,7 @@ namespace chromeos { |
class KioskAppData; |
class KioskAppExternalLoader; |
class KioskAppManagerObserver; |
+class KioskExternalUpdater; |
// KioskAppManager manages cached app data. |
class KioskAppManager : public KioskAppDataDelegate, |
@@ -85,6 +86,10 @@ class KioskAppManager : public KioskAppDataDelegate, |
// Sub directory under DIR_USER_DATA to store cached crx files. |
static const char kCrxCacheDir[]; |
+ // Sub directory under DIR_USER_DATA to store unpacked crx file for validating |
+ // its signature. |
+ static const char kCrxUnpackDir[]; |
+ |
// Gets the KioskAppManager instance, which is lazily created on first call.. |
static KioskAppManager* Get(); |
@@ -157,6 +162,12 @@ class KioskAppManager : public KioskAppDataDelegate, |
// Returns true if the app is found in cache. |
bool HasCachedCrx(const std::string& app_id) const; |
+ // Gets the path and version of the cached crx with |app_id|. |
+ // Returns true if the app is found in cache. |
+ bool GetCachedCrx(const std::string& app_id, |
+ base::FilePath* file_path, |
+ std::string* version) const; |
+ |
void AddObserver(KioskAppManagerObserver* observer); |
void RemoveObserver(KioskAppManagerObserver* observer); |
@@ -169,6 +180,19 @@ class KioskAppManager : public KioskAppDataDelegate, |
void UpdateExternalCache(); |
+ // Monitors kiosk external update from usb stick. |
+ void MonitorKioskExternalUpdate(); |
+ |
+ // Invoked when kiosk app cache has been updated. |
+ void OnKioskAppCacheUpdated(const std::string& app_id); |
+ |
+ // Installs the validated external extension into cache. |
+ void PutValidatedExternalExtension( |
+ const std::string& app_id, |
+ const base::FilePath& crx_path, |
+ const std::string& version, |
+ const ExternalCache::PutExternalExtensionCallback& callback); |
+ |
bool external_loader_created() const { return external_loader_created_; } |
private: |
@@ -232,12 +256,7 @@ class KioskAppManager : public KioskAppDataDelegate, |
void SetAutoLoginState(AutoLoginState state); |
void GetCrxCacheDir(base::FilePath* cache_dir); |
- |
- // Gets the file path and version information of the cached crx with |app_id|. |
- // Returns true if the app is found in cache. |
- bool GetCachedCrx(const std::string& app_id, |
- base::FilePath* file_path, |
- std::string* version) const; |
+ void GetCrxUnpackDir(base::FilePath* unpack_dir); |
// True if machine ownership is already established. |
bool ownership_established_; |
@@ -251,6 +270,7 @@ class KioskAppManager : public KioskAppDataDelegate, |
local_account_auto_login_id_subscription_; |
scoped_ptr<ExternalCache> external_cache_; |
+ scoped_ptr<KioskExternalUpdater> usb_stick_updater_; |
// The extension external loader for installing kiosk app. |
bool external_loader_created_; |