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 7a9fe670717e657fafc2c94aacf44af4e7e58c44..577ca0ef7ddf0374ba204525388ae4947a9065e9 100644 |
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.h |
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.h |
@@ -29,11 +29,13 @@ class RefCountedString; |
namespace extensions { |
class Extension; |
+class ExternalLoader; |
} |
namespace chromeos { |
class KioskAppData; |
+class KioskAppExternalLoader; |
class KioskAppManagerObserver; |
// KioskAppManager manages cached app data. |
@@ -150,9 +152,32 @@ class KioskAppManager : public KioskAppDataDelegate, |
Profile* profile, |
const extensions::Extension* app); |
+ // 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, |
xiyuan
2014/07/08 21:50:59
nit: It seems we no longer need to expose crx path
jennyz
2014/07/12 00:03:20
This function is still needed in KioskAppManagerTe
|
+ base::FilePath* file_path, |
+ std::string* version); |
+ |
+ // Returns true if the extension with |id| is pending for caching crx file |
+ // for the first time. |
+ bool IsExtensionPendingForCache(const std::string& id); |
+ |
+ // Returns true if the extensions with |id| is pending for update check. |
+ // The crx file fo the extension has been cached previously. |
+ bool IsExtensionPendingForUpdateCheck(const std::string& id); |
xiyuan
2014/07/08 21:50:59
We can probably merge this with IsExtensionPending
jennyz
2014/07/12 00:03:20
We don't need both functions now, removed.
|
+ |
void AddObserver(KioskAppManagerObserver* observer); |
void RemoveObserver(KioskAppManagerObserver* observer); |
+ // Creates extensions::ExternalLoader for installing kiosk apps during their |
+ // first time launch. |
+ extensions::ExternalLoader* CreateExternalLoader(); |
+ |
+ // Installs kiosk app with |id|. |
+ void InstallKioskApp(const std::string& id); |
xiyuan
2014/07/08 21:50:59
nit: InstallKioskApp -> InstallFromCache to be mor
jennyz
2014/07/12 00:03:20
Done.
|
+ |
+ bool external_loader_created() const { return external_loader_created_; } |
+ |
private: |
friend struct base::DefaultLazyInstanceTraits<KioskAppManager>; |
friend struct base::DefaultDeleter<KioskAppManager>; |
@@ -176,7 +201,7 @@ class KioskAppManager : public KioskAppDataDelegate, |
const KioskAppData* GetAppData(const std::string& app_id) const; |
KioskAppData* GetAppDataMutable(const std::string& app_id); |
- // Update app data |apps_| based on CrosSettings. |
+ // Updates app data |apps_| based on CrosSettings. |
void UpdateAppData(); |
// KioskAppDataDelegate overrides: |
@@ -214,10 +239,6 @@ class KioskAppManager : public KioskAppDataDelegate, |
void GetCrxCacheDir(base::FilePath* cache_dir); |
- bool GetCachedCrx(const std::string& app_id, |
- base::FilePath* file_path, |
- std::string* version); |
- |
// True if machine ownership is already established. |
bool ownership_established_; |
ScopedVector<KioskAppData> apps_; |
@@ -231,6 +252,10 @@ class KioskAppManager : public KioskAppDataDelegate, |
scoped_ptr<ExternalCache> external_cache_; |
+ // The extension external loader for installing kiosk app. |
+ bool external_loader_created_; |
+ base::WeakPtr<KioskAppExternalLoader> external_loader_; |
+ |
DISALLOW_COPY_AND_ASSIGN(KioskAppManager); |
}; |