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; |