| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerTest, EnterBlankExistingPassphrase); | 91 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerTest, EnterBlankExistingPassphrase); |
| 92 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerTest, TurnOnEncryptAllDisallowed); | 92 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerTest, TurnOnEncryptAllDisallowed); |
| 93 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, | 93 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, |
| 94 UnrecoverableErrorInitializingSync); | 94 UnrecoverableErrorInitializingSync); |
| 95 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, GaiaErrorInitializingSync); | 95 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, GaiaErrorInitializingSync); |
| 96 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, HandleCaptcha); | 96 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, HandleCaptcha); |
| 97 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, HandleGaiaAuthFailure); | 97 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, HandleGaiaAuthFailure); |
| 98 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, | 98 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerNonCrosTest, |
| 99 SubmitAuthWithInvalidUsername); | 99 SubmitAuthWithInvalidUsername); |
| 100 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerFirstSigninTest, DisplayBasicLogin); | 100 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerFirstSigninTest, DisplayBasicLogin); |
| 101 FRIEND_TEST_ALL_PREFIXES(PeopleHandlerTest, |
| 102 AcquireSyncBlockerWhenLoadingSyncSettingsSubpage); |
| 101 | 103 |
| 102 // SettingsPageUIHandler implementation. | 104 // SettingsPageUIHandler implementation. |
| 103 void RegisterMessages() override; | 105 void RegisterMessages() override; |
| 104 void OnJavascriptAllowed() override; | 106 void OnJavascriptAllowed() override; |
| 105 void OnJavascriptDisallowed() override; | 107 void OnJavascriptDisallowed() override; |
| 106 | 108 |
| 107 // SyncStartupTracker::Observer implementation. | 109 // SyncStartupTracker::Observer implementation. |
| 108 void SyncStartupCompleted() override; | 110 void SyncStartupCompleted() override; |
| 109 void SyncStartupFailed() override; | 111 void SyncStartupFailed() override; |
| 110 | 112 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 169 |
| 168 // Pushes the updated sync prefs to JavaScript. | 170 // Pushes the updated sync prefs to JavaScript. |
| 169 void PushSyncPrefs(); | 171 void PushSyncPrefs(); |
| 170 | 172 |
| 171 // Sends the current sync status to the JavaScript WebUI code. | 173 // Sends the current sync status to the JavaScript WebUI code. |
| 172 void UpdateSyncStatus(); | 174 void UpdateSyncStatus(); |
| 173 | 175 |
| 174 // Suppresses any further signin promos, since the user has signed in once. | 176 // Suppresses any further signin promos, since the user has signed in once. |
| 175 void MarkFirstSetupComplete(); | 177 void MarkFirstSetupComplete(); |
| 176 | 178 |
| 179 // If we're directly loading the sync setup page, we acquire a |
| 180 // SetupInProgressHandle early in order to prevent a lapse in |
| 181 // ProfileSyncService's "SetupInProgress" status. This lapse previously |
| 182 // occured between when the sync confirmation dialog was closed and when the |
| 183 // sync setup page hadn't yet fired the SyncSetupShowSetupUI event. |
| 184 // InitializeSyncBlocker is responsible for checking if we're navigating to |
| 185 // the setup page and acquiring the sync_blocker. |
| 186 void InitializeSyncBlocker(); |
| 187 |
| 177 // Weak pointer. | 188 // Weak pointer. |
| 178 Profile* profile_; | 189 Profile* profile_; |
| 179 | 190 |
| 180 // Helper object used to wait for the sync engine to startup. | 191 // Helper object used to wait for the sync engine to startup. |
| 181 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; | 192 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; |
| 182 | 193 |
| 183 // Prevents Sync from running until configuration is complete. | 194 // Prevents Sync from running until configuration is complete. |
| 184 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; | 195 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; |
| 185 | 196 |
| 186 // Set to true whenever the sync configure UI is visible. This is used to tell | 197 // Set to true whenever the sync configure UI is visible. This is used to tell |
| (...skipping 12 matching lines...) Expand all Loading... |
| 199 ScopedObserver<SigninManagerBase, PeopleHandler> signin_observer_; | 210 ScopedObserver<SigninManagerBase, PeopleHandler> signin_observer_; |
| 200 ScopedObserver<browser_sync::ProfileSyncService, PeopleHandler> | 211 ScopedObserver<browser_sync::ProfileSyncService, PeopleHandler> |
| 201 sync_service_observer_; | 212 sync_service_observer_; |
| 202 | 213 |
| 203 DISALLOW_COPY_AND_ASSIGN(PeopleHandler); | 214 DISALLOW_COPY_AND_ASSIGN(PeopleHandler); |
| 204 }; | 215 }; |
| 205 | 216 |
| 206 } // namespace settings | 217 } // namespace settings |
| 207 | 218 |
| 208 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ | 219 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ |
| OLD | NEW |