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

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

Issue 540673003: Add more browser tests for Kiosk update from usb stick. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove TestObsesrver. Created 6 years, 3 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_external_updater.cc
diff --git a/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc b/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc
index dea8b8b5540230aada74112c503f1deb3ec93dcc..d40d03801f5d083cb922094be39250cf04174d4d 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc
@@ -242,11 +242,13 @@ void KioskExternalUpdater::ProcessParsedManifest(
NotifyKioskUpdateProgress(
ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
IDS_KIOSK_EXTERNAL_UPDATE_NO_MANIFEST));
+ KioskAppManager::Get()->OnKioskAppExternalUpdateComplete(false);
return;
} else if (*parsing_error == ERROR_INVALID_MANIFEST) {
NotifyKioskUpdateProgress(
ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
IDS_KIOSK_EXTERNAL_UPDATE_INVALID_MANIFEST));
+ KioskAppManager::Get()->OnKioskAppExternalUpdateComplete(false);
return;
}
@@ -301,6 +303,7 @@ void KioskExternalUpdater::ProcessParsedManifest(
NotifyKioskUpdateProgress(
ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
IDS_KIOSK_EXTERNAL_UPDATE_NO_UPDATES));
+ KioskAppManager::Get()->OnKioskAppExternalUpdateComplete(false);
return;
}
@@ -347,6 +350,17 @@ bool KioskExternalUpdater::IsExternalUpdatePending() {
return false;
}
+bool KioskExternalUpdater::IsAllExternalUpdatesSucceeded() {
+ for (ExternalUpdateMap::iterator it = external_updates_.begin();
+ it != external_updates_.end();
+ ++it) {
+ if (it->second.update_status != SUCCESS) {
+ return false;
+ }
+ }
+ return true;
+}
+
bool KioskExternalUpdater::ShouldDoExternalUpdate(
const std::string& app_id,
const std::string& version,
@@ -440,6 +454,8 @@ void KioskExternalUpdater::MayBeNotifyKioskAppUpdate() {
NotifyKioskUpdateProgress(GetUpdateReportMessage());
NotifyKioskAppUpdateAvailable();
+ KioskAppManager::Get()->OnKioskAppExternalUpdateComplete(
+ IsAllExternalUpdatesSucceeded());
}
void KioskExternalUpdater::NotifyKioskAppUpdateAvailable() {
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_external_updater.h ('k') | chrome/browser/chromeos/login/kiosk_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698