Index: chrome/browser/profiles/profile_impl.h |
diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h |
index 14599cfec92cb79cb4e2af26c85ca935169651d6..7bd809374494c969bb4e96d2326eaae1fcfcb905 100644 |
--- a/chrome/browser/profiles/profile_impl.h |
+++ b/chrome/browser/profiles/profile_impl.h |
@@ -137,6 +137,9 @@ class ProfileImpl : public Profile { |
void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia) override; |
void OnLogin() override; |
void InitChromeOSPreferences() override; |
+ void SetOnPrefsLoadedHook( |
+ const base::Callback<void(Profile*, const base::Closure&)>& callback) |
+ override; |
#endif // defined(OS_CHROMEOS) |
PrefProxyConfigTracker* GetProxyConfigTracker() override; |
@@ -165,9 +168,12 @@ class ProfileImpl : public Profile { |
// Does final initialization. Should be called after prefs were loaded. |
void DoFinalInit(); |
- // Does final prefs initialization and calls Init(). |
+ // Check |success|, |on_prefs_loaded_hook_| and proceed to OnPrefsLoadedImpl. |
void OnPrefsLoaded(bool success); |
+ // Does final prefs initialization and calls Init(). |
+ void OnPrefsLoadedImpl(); |
+ |
#if defined(ENABLE_SESSION_SERVICE) |
void StopCreateSessionServiceTimer(); |
@@ -259,6 +265,16 @@ class ProfileImpl : public Profile { |
scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
+ Profile::Delegate* delegate_; |
+ |
+ chrome_browser_net::Predictor* predictor_; |
+ |
+#if defined(OS_CHROMEOS) |
+ // Hook to interrupt profile initialization flow (see |
+ // Profile::SetOnPrefsLoadedHook). |
+ base::Callback<void(Profile*, const base::Closure&)> on_prefs_loaded_hook_; |
+#endif |
+ |
// STOP!!!! DO NOT ADD ANY MORE ITEMS HERE!!!! |
// |
// Instead, make your Service/Manager/whatever object you're hanging off the |
@@ -273,10 +289,6 @@ class ProfileImpl : public Profile { |
// components/keyed_service/core/keyed_service.h |
// components/keyed_service/content/browser_context_keyed_service_factory.* |
- Profile::Delegate* delegate_; |
- |
- chrome_browser_net::Predictor* predictor_; |
- |
DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
}; |