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

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

Issue 209143002: Added shortcut for NW config screen in kiosk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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 94e3ef68d66b369956e85d970023e1e19e5008ae..ecf72d02d0f71d33073f58fc1ac6649da6234a16 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
@@ -51,6 +51,7 @@ namespace chromeos {
namespace {
+const int kRerunDelay = 2;
xiyuan 2014/03/26 16:24:16 no longer needed.
zel 2014/03/26 17:30:58 Done.
const char kOAuthRefreshToken[] = "refresh_token";
const char kOAuthClientId[] = "client_id";
const char kOAuthClientSecret[] = "client_secret";
@@ -148,6 +149,16 @@ void StartupAppLauncher::OnOAuthFileLoaded(KioskOAuthParams* auth_params) {
InitializeTokenService();
}
+void StartupAppLauncher::RestartLauncher() {
+ // If installer is still running in the background, delay the restart.
xiyuan 2014/03/26 16:24:16 nit: Update the comment to clarify that start up c
zel 2014/03/26 17:30:58 Done.
+ if (installer_ != NULL) {
+ LOG(WARNING) << "Installer still running";
+ return;
+ }
+
+ MaybeInitializeNetwork();
+}
+
void StartupAppLauncher::MaybeInitializeNetwork() {
network_ready_handled_ = false;
@@ -295,6 +306,11 @@ void StartupAppLauncher::BeginInstall() {
void StartupAppLauncher::InstallCallback(bool success,
const std::string& error) {
installer_ = NULL;
+ if (delegate_->IsShowingNetworkConfigScreen()) {
+ LOG(WARNING) << "Showing network config screen";
+ return;
+ }
+
if (success) {
// Finish initialization after the callback returns.
// So that the app finishes its installation.
@@ -319,7 +335,8 @@ void StartupAppLauncher::InstallCallback(bool success,
return;
}
- OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_INSTALL);
+ if (!delegate_->IsShowingNetworkConfigScreen())
xiyuan 2014/03/26 16:24:16 This "if" seem unnecessary.
zel 2014/03/26 17:30:58 Done.
+ OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_INSTALL);
}
void StartupAppLauncher::OnReadyToLaunch() {

Powered by Google App Engine
This is Rietveld 408576698