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

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

Issue 2662113002: When restoring kiosk app after crash, skip app installation steps (Closed)
Patch Set: Created 3 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/startup_app_launcher.cc
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
index 6fe2fb7ded488bcd9f3e0ec65a98570f6023b3e9..cb18be2d59c4049075a92323913a7c8de434cd34 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
@@ -96,14 +96,21 @@ void StartupAppLauncher::Initialize() {
}
void StartupAppLauncher::ContinueWithNetworkReady() {
- if (!network_ready_handled_) {
- network_ready_handled_ = true;
- // The network might not be ready when KioskAppManager tries to update
- // external cache initially. Update the external cache now that the network
- // is ready for sure.
- wait_for_crx_update_ = true;
- KioskAppManager::Get()->UpdateExternalCache();
+ if (network_ready_handled_)
+ return;
+
+ network_ready_handled_ = true;
+
+ if (!delegate_->ShouldUpdateCacheOnNetworkReady()) {
+ BeginInstall();
xiyuan 2017/01/30 23:13:06 Should we skip all installation stuff and jump to
tbarzic 2017/01/30 23:45:21 I'm slightly concerned that in certain situations
xiyuan 2017/01/30 23:49:44 Good point. BeginInstall() it is then.
tbarzic 2017/01/30 23:55:02 Actually, we should only end up in that state if t
xiyuan 2017/01/30 23:59:48 SG.
+ return;
}
+
+ // The network might not be ready when KioskAppManager tries to update
+ // external cache initially. Update the external cache now that the network
+ // is ready for sure.
+ wait_for_crx_update_ = true;
+ KioskAppManager::Get()->UpdateExternalCache();
}
void StartupAppLauncher::StartLoadingOAuthFile() {
@@ -271,7 +278,8 @@ void StartupAppLauncher::MaybeCheckExtensionUpdate() {
extensions::ExtensionSystem::Get(profile_)
->extension_service()
->updater();
- if (!delegate_->IsNetworkReady() || !updater ||
+ if (!delegate_->IsNetworkReady() ||
+ !delegate_->ShouldUpdateCacheOnNetworkReady() || !updater ||
PrimaryAppHasPendingUpdate()) {
MaybeLaunchApp();
return;
« no previous file with comments | « chrome/browser/chromeos/app_mode/startup_app_launcher.h ('k') | chrome/browser/chromeos/login/app_launch_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698