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> |
| 9 |
8 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
13 #include "chrome/browser/sync/sync_startup_tracker.h" | 14 #include "chrome/browser/sync/sync_startup_tracker.h" |
14 #include "chrome/browser/ui/webui/options/options_ui.h" | 15 #include "chrome/browser/ui/webui/options/options_ui.h" |
15 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 16 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
16 | 17 |
17 class LoginUIService; | 18 class LoginUIService; |
18 class ProfileSyncService; | 19 class ProfileSyncService; |
19 class SigninManagerBase; | 20 class SigninManagerBase; |
20 | 21 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 bool IsExistingWizardPresent(); | 144 bool IsExistingWizardPresent(); |
144 | 145 |
145 // If a wizard already exists, focus it and return true. | 146 // If a wizard already exists, focus it and return true. |
146 bool FocusExistingWizardIfPresent(); | 147 bool FocusExistingWizardIfPresent(); |
147 | 148 |
148 // Display the configure sync UI. If |passphrase_failed| is true, the account | 149 // Display the configure sync UI. If |passphrase_failed| is true, the account |
149 // requires a passphrase and one hasn't been provided or it was invalid. | 150 // requires a passphrase and one hasn't been provided or it was invalid. |
150 void DisplayConfigureSync(bool passphrase_failed); | 151 void DisplayConfigureSync(bool passphrase_failed); |
151 | 152 |
152 // Helper object used to wait for the sync backend to startup. | 153 // Helper object used to wait for the sync backend to startup. |
153 scoped_ptr<SyncStartupTracker> sync_startup_tracker_; | 154 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; |
154 | 155 |
155 // Set to true whenever the sync configure UI is visible. This is used to tell | 156 // Set to true whenever the sync configure UI is visible. This is used to tell |
156 // what stage of the setup wizard the user was in and to update the UMA | 157 // what stage of the setup wizard the user was in and to update the UMA |
157 // histograms in the case that the user cancels out. | 158 // histograms in the case that the user cancels out. |
158 bool configuring_sync_; | 159 bool configuring_sync_; |
159 | 160 |
160 // The OneShotTimer object used to timeout of starting the sync backend | 161 // The OneShotTimer object used to timeout of starting the sync backend |
161 // service. | 162 // service. |
162 scoped_ptr<base::OneShotTimer> backend_start_timer_; | 163 std::unique_ptr<base::OneShotTimer> backend_start_timer_; |
163 | 164 |
164 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); | 165 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); |
165 }; | 166 }; |
166 | 167 |
167 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ | 168 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ |
OLD | NEW |