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

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

Issue 1904323002: kiosk: Install secondary app after DelayNetworkCall (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix offline launch Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2f67c0e956d69c9900ab30d31ef02949219e422b..d457fa8bc8a77443266292d0e233101ef6c707e7 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/json/json_file_value_serializer.h"
@@ -14,6 +15,7 @@
#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
#include "chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.h"
#include "chrome/browser/chromeos/login/session/user_session_manager.h"
+#include "chrome/browser/chromeos/net/delay_network_call.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/install_tracker.h"
#include "chrome/browser/extensions/install_tracker_factory.h"
@@ -509,7 +511,10 @@ void StartupAppLauncher::BeginInstall() {
void StartupAppLauncher::MaybeInstallSecondaryApps() {
if (!AreSecondaryAppsInstalled() && !delegate_->IsNetworkReady()) {
- OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_INSTALL);
+ DelayNetworkCall(
+ base::TimeDelta::FromMilliseconds(kDefaultNetworkRetryDelayMS),
+ base::Bind(&StartupAppLauncher::MaybeInstallSecondaryApps,
+ AsWeakPtr()));
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698