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

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

Issue 149843004: kiosk: Skip network check for offline enabled app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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.h
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.h b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
index e536a12455fb6472368b3749822c2aa9ddea27db..1a74699c8d61542e37116228f5c8ff369cf8a421 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.h
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
@@ -23,11 +23,12 @@ namespace chromeos {
// Launches the app at startup. The flow roughly looks like this:
// First call Initialize():
-// - Checks if the app is installed in user profile (aka app profile);
-// - If the app is installed, launch it and finish the flow;
-// - If not installed, prepare to start install by checking network online
-// state;
-// - If network gets online, start to install the app from web store;
+// - Attempts to load oauth token file. Stores the loaded tokens in
+// |auth_params_|.
+// - Initialize token service and inject |auth_params_| if needed.
+// - Initialize network if app is not installed or not offline_enabled.
+// - If network is online, install or update the app as needed.
+// - After the app is installed/updated, launch it and finish the flow;
// Report OnLauncherInitialized() or OnLaunchFailed() to observers:
// - If all goes good, launches the app and finish the flow;
class StartupAppLauncher
@@ -40,6 +41,9 @@ class StartupAppLauncher
// launch flow is paused until ContinueWithNetworkReady is called.
virtual void InitializeNetwork() = 0;
+ // Returns true if Internet is online.
+ virtual bool IsNetworkReady() = 0;
+
virtual void OnLoadingOAuthFile() = 0;
virtual void OnInitializingTokenService() = 0;
virtual void OnInstallingApp() = 0;
@@ -96,7 +100,7 @@ class StartupAppLauncher
void UpdateAppData();
void InitializeTokenService();
- void InitializeNetwork();
+ void MaybeInitializeNetwork();
void StartLoadingOAuthFile();
static void LoadOAuthFileOnBlockingPool(KioskOAuthParams* auth_params);
« no previous file with comments | « chrome/browser/chromeos/app_mode/app_launch_utils.cc ('k') | chrome/browser/chromeos/app_mode/startup_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698