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

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

Issue 141803014: Merge 244632 "kiosk: Do update check during launch." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: 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
===================================================================
--- chrome/browser/chromeos/app_mode/kiosk_app_manager.cc (revision 246680)
+++ chrome/browser/chromeos/app_mode/kiosk_app_manager.cc (working copy)
@@ -269,6 +269,7 @@
}
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 @@
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 @@
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