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_OPTIONS_SYNC_SETUP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 } // namespace browser_sync | 23 } // namespace browser_sync |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 class WebContents; | 26 class WebContents; |
27 } // namespace content | 27 } // namespace content |
28 | 28 |
29 namespace signin_metrics { | 29 namespace signin_metrics { |
30 enum class AccessPoint; | 30 enum class AccessPoint; |
31 } // namespace signin_metrics | 31 } // namespace signin_metrics |
32 | 32 |
33 namespace syncer { | 33 namespace sync_driver { |
34 class SyncSetupInProgressHandle; | 34 class SyncSetupInProgressHandle; |
35 } // namespace syncer | 35 } // namespace sync_driver |
36 | 36 |
37 class SyncSetupHandler : public options::OptionsPageUIHandler, | 37 class SyncSetupHandler : public options::OptionsPageUIHandler, |
38 public SyncStartupTracker::Observer, | 38 public SyncStartupTracker::Observer, |
39 public LoginUIService::LoginUI { | 39 public LoginUIService::LoginUI { |
40 public: | 40 public: |
41 SyncSetupHandler(); | 41 SyncSetupHandler(); |
42 ~SyncSetupHandler() override; | 42 ~SyncSetupHandler() override; |
43 | 43 |
44 // OptionsPageUIHandler implementation. | 44 // OptionsPageUIHandler implementation. |
45 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; | 45 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 bool FocusExistingWizardIfPresent(); | 156 bool FocusExistingWizardIfPresent(); |
157 | 157 |
158 // Display the configure sync UI. If |passphrase_failed| is true, the account | 158 // Display the configure sync UI. If |passphrase_failed| is true, the account |
159 // requires a passphrase and one hasn't been provided or it was invalid. | 159 // requires a passphrase and one hasn't been provided or it was invalid. |
160 void DisplayConfigureSync(bool passphrase_failed); | 160 void DisplayConfigureSync(bool passphrase_failed); |
161 | 161 |
162 // Helper object used to wait for the sync backend to startup. | 162 // Helper object used to wait for the sync backend to startup. |
163 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; | 163 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; |
164 | 164 |
165 // Prevents Sync from running until configuration is complete. | 165 // Prevents Sync from running until configuration is complete. |
166 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; | 166 std::unique_ptr<sync_driver::SyncSetupInProgressHandle> sync_blocker_; |
167 | 167 |
168 // Set to true whenever the sync configure UI is visible. This is used to tell | 168 // Set to true whenever the sync configure UI is visible. This is used to tell |
169 // what stage of the setup wizard the user was in and to update the UMA | 169 // what stage of the setup wizard the user was in and to update the UMA |
170 // histograms in the case that the user cancels out. | 170 // histograms in the case that the user cancels out. |
171 bool configuring_sync_; | 171 bool configuring_sync_; |
172 | 172 |
173 // The OneShotTimer object used to timeout of starting the sync backend | 173 // The OneShotTimer object used to timeout of starting the sync backend |
174 // service. | 174 // service. |
175 std::unique_ptr<base::OneShotTimer> backend_start_timer_; | 175 std::unique_ptr<base::OneShotTimer> backend_start_timer_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); | 177 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); |
178 }; | 178 }; |
179 | 179 |
180 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ | 180 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ |
OLD | NEW |