| 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..2b0ddc5c03c2c8e6f29db4545a321c998210b198 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,12 @@ 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);
|
| +
|
| bool external_loader_created() const { return external_loader_created_; }
|
|
|
| private:
|
| @@ -232,12 +249,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 +263,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_;
|
|
|