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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.cc

Issue 137343003: kiosk: Do update check during launch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for #1 comments, use default for empty update url and skip for bad update url Created 6 years, 11 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/app_mode/kiosk_app_manager.cc
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
index 71bfa83873ce2e5e71e339c98d2c6eed3d91acbe..74f33566a2b388dbb49e7797795427ff2f2fc3e0 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
@@ -269,6 +269,7 @@ void KioskAppManager::RemoveApp(const std::string& app_id) {
}
void KioskAppManager::GetApps(Apps* apps) const {
+ apps->clear();
apps->reserve(apps_.size());
for (size_t i = 0; i < apps_.size(); ++i)
apps->push_back(App(*apps_[i]));
@@ -302,6 +303,25 @@ bool KioskAppManager::GetDisableBailoutShortcut() const {
return false;
}
+void KioskAppManager::ClearAppData(const std::string& app_id) {
+ KioskAppData* app_data = GetAppDataMutable(app_id);
+ if (!app_data)
+ return;
+
+ app_data->ClearCache();
+}
+
+void KioskAppManager::UpdateAppDataFromProfile(
+ const std::string& app_id,
+ Profile* profile,
+ const extensions::Extension* app) {
+ KioskAppData* app_data = GetAppDataMutable(app_id);
+ if (!app_data)
+ return;
+
+ app_data->LoadFromInstalledApp(profile, app);
+}
+
void KioskAppManager::AddObserver(KioskAppManagerObserver* observer) {
observers_.AddObserver(observer);
}
@@ -341,6 +361,10 @@ const KioskAppData* KioskAppManager::GetAppData(
return NULL;
}
+KioskAppData* KioskAppManager::GetAppDataMutable(const std::string& app_id) {
+ return const_cast<KioskAppData*>(GetAppData(app_id));
+}
+
void KioskAppManager::UpdateAppData() {
// Gets app id to data mapping for existing apps.
std::map<std::string, KioskAppData*> old_apps;

Powered by Google App Engine
This is Rietveld 408576698