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

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

Issue 1488393002: Check import module update before launching the primary kiosk app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 3ac35470329debadabad1f87bfb5b8169f3af285..d113450bf2c46c5606bee6ce342ded9a21f88f24 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.h
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
@@ -13,6 +13,8 @@
#include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h"
#include "chrome/browser/extensions/install_observer.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "google_apis/gaia/oauth2_token_service.h"
class Profile;
@@ -32,7 +34,8 @@ namespace chromeos {
class StartupAppLauncher : public base::SupportsWeakPtr<StartupAppLauncher>,
public OAuth2TokenService::Observer,
public extensions::InstallObserver,
- public KioskAppManagerObserver {
+ public KioskAppManagerObserver,
+ public content::NotificationObserver {
public:
class Delegate {
public:
@@ -94,6 +97,9 @@ class StartupAppLauncher : public base::SupportsWeakPtr<StartupAppLauncher>,
void MaybeInstallSecondaryApps();
void MaybeLaunchApp();
+ void MaybeCheckExtensionUpdate();
+ void OnExtensionUpdateCheckFinished();
+
void StartLoadingOAuthFile();
static void LoadOAuthFileOnBlockingPool(KioskOAuthParams* auth_params);
void OnOAuthFileLoaded(KioskOAuthParams* auth_params);
@@ -128,17 +134,24 @@ class StartupAppLauncher : public base::SupportsWeakPtr<StartupAppLauncher>,
void OnKioskExtensionLoadedInCache(const std::string& app_id) override;
void OnKioskExtensionDownloadFailed(const std::string& app_id) override;
+ // content::NotificationObserver implementation.
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
+
Profile* profile_;
const std::string app_id_;
const bool diagnostic_mode_;
Delegate* delegate_;
- bool network_ready_handled_;
- int launch_attempt_;
- bool ready_to_launch_;
- bool wait_for_crx_update_;
- bool secondary_apps_updated_;
+ bool network_ready_handled_ = false;
+ int launch_attempt_ = 0;
+ bool ready_to_launch_ = false;
+ bool wait_for_crx_update_ = false;
+ bool secondary_apps_installed_ = false;
+ bool extension_update_found_ = false;
KioskOAuthParams auth_params_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher);
};

Powered by Google App Engine
This is Rietveld 408576698