| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYNC_SETUP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/timer.h" | 10 #include "base/timer.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void CloseSyncSetup(); | 72 void CloseSyncSetup(); |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, DisplayBasicLogin); | 75 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, DisplayBasicLogin); |
| 76 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, | 76 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, |
| 77 DisplayConfigureWithBackendDisabledAndCancel); | 77 DisplayConfigureWithBackendDisabledAndCancel); |
| 78 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, SelectCustomEncryption); | 78 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, SelectCustomEncryption); |
| 79 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, ShowSyncSetupWhenNotSignedIn); | 79 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, ShowSyncSetupWhenNotSignedIn); |
| 80 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, SuccessfullySetPassphrase); | 80 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, SuccessfullySetPassphrase); |
| 81 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestSyncEverything); | 81 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestSyncEverything); |
| 82 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestSyncNothing); |
| 82 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestSyncAllManually); | 83 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestSyncAllManually); |
| 83 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestPassphraseStillRequired); | 84 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestPassphraseStillRequired); |
| 84 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestSyncIndividualTypes); | 85 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TestSyncIndividualTypes); |
| 85 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TurnOnEncryptAll); | 86 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, TurnOnEncryptAll); |
| 86 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, UnsuccessfullySetPassphrase); | 87 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerTest, UnsuccessfullySetPassphrase); |
| 87 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerNonCrosTest, | 88 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerNonCrosTest, |
| 88 UnrecoverableErrorInitializingSync); | 89 UnrecoverableErrorInitializingSync); |
| 89 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerNonCrosTest, | 90 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerNonCrosTest, |
| 90 GaiaErrorInitializingSync); | 91 GaiaErrorInitializingSync); |
| 91 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerNonCrosTest, HandleCaptcha); | 92 FRIEND_TEST_ALL_PREFIXES(SyncSetupHandlerNonCrosTest, HandleCaptcha); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 187 |
| 187 // Displays an error dialog which shows timeout of starting the sync backend. | 188 // Displays an error dialog which shows timeout of starting the sync backend. |
| 188 void DisplayTimeout(); | 189 void DisplayTimeout(); |
| 189 | 190 |
| 190 // Returns true if this object is the active login object. | 191 // Returns true if this object is the active login object. |
| 191 bool IsActiveLogin() const; | 192 bool IsActiveLogin() const; |
| 192 | 193 |
| 193 // If a wizard already exists, focus it and return true. | 194 // If a wizard already exists, focus it and return true. |
| 194 bool FocusExistingWizardIfPresent(); | 195 bool FocusExistingWizardIfPresent(); |
| 195 | 196 |
| 196 // Invokes the javascript call to close the setup overlay. | 197 // Invokes the javascript call to close the setup overlay, and terminates the |
| 198 // sync setup flow. |
| 197 void CloseOverlay(); | 199 void CloseOverlay(); |
| 198 | 200 |
| 199 #if !defined(OS_CHROMEOS) | 201 #if !defined(OS_CHROMEOS) |
| 200 // When using web-flow, closes the Gaia page used to collection user | 202 // When using web-flow, closes the Gaia page used to collection user |
| 201 // credentials. | 203 // credentials. |
| 202 void CloseGaiaSigninPage(); | 204 void CloseGaiaSigninPage(); |
| 203 #endif | 205 #endif |
| 204 | 206 |
| 205 // The SigninTracker object used to determine when the user has fully signed | 207 // The SigninTracker object used to determine when the user has fully signed |
| 206 // in (this requires waiting for various services to initialize and tracking | 208 // in (this requires waiting for various services to initialize and tracking |
| (...skipping 28 matching lines...) Expand all Loading... |
| 235 ProfileManager* const profile_manager_; | 237 ProfileManager* const profile_manager_; |
| 236 | 238 |
| 237 // The OneShotTimer object used to timeout of starting the sync backend | 239 // The OneShotTimer object used to timeout of starting the sync backend |
| 238 // service. | 240 // service. |
| 239 scoped_ptr<base::OneShotTimer<SyncSetupHandler> > backend_start_timer_; | 241 scoped_ptr<base::OneShotTimer<SyncSetupHandler> > backend_start_timer_; |
| 240 | 242 |
| 241 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); | 243 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); |
| 242 }; | 244 }; |
| 243 | 245 |
| 244 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ | 246 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ |
| OLD | NEW |