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

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

Issue 137343003: kiosk: Do update check during launch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for #1 comments, use default for empty update url and skip for bad update url Created 6 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.h
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.h b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
index 43f7cbf0c910b02714d66ee9daad0a903364fd8b..72a45979f55c17f93af3dcbd8498ff116369d2a9 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.h
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
@@ -74,12 +74,25 @@ class StartupAppLauncher
std::string client_secret;
};
+ // A class to check if the app has an update. It invokes BeginInstall
+ // if the app is not installed or not up-to-date. Otherwise, it invokes
+ // OnReadyToLaunch.
+ class AppUpdateChecker;
+
void OnLaunchSuccess();
void OnLaunchFailure(KioskAppLaunchError::Error error);
+ void MaybeInstall();
+
+ // Callbacks from AppUpdateChecker
+ void OnUpdateCheckNotInstalled();
+ void OnUpdateCheckUpdateAvailable();
+ void OnUpdateCheckNoUpdate();
+
void BeginInstall();
void InstallCallback(bool success, const std::string& error);
void OnReadyToLaunch();
+ void UpdateAppData();
void InitializeTokenService();
void InitializeNetwork();
@@ -101,6 +114,8 @@ class StartupAppLauncher
scoped_refptr<extensions::WebstoreStandaloneInstaller> installer_;
KioskOAuthParams auth_params_;
+ scoped_ptr<AppUpdateChecker> update_checker_;
+
DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher);
};
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_update_service.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