Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Side by Side Diff: chrome/browser/ui/webui/options/sync_setup_handler.h

Issue 2066493003: Revert of Sync: Support multiple setup UIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/sync/sync_startup_tracker.h" 14 #include "chrome/browser/sync/sync_startup_tracker.h"
15 #include "chrome/browser/ui/webui/options/options_ui.h" 15 #include "chrome/browser/ui/webui/options/options_ui.h"
16 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 16 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
17 17
18 class LoginUIService; 18 class LoginUIService;
19 class ProfileSyncService; 19 class ProfileSyncService;
20 class SigninManagerBase; 20 class SigninManagerBase;
21 21
22 namespace content { 22 namespace content {
23 class WebContents; 23 class WebContents;
24 } 24 }
25 25
26 namespace signin_metrics { 26 namespace signin_metrics {
27 enum class AccessPoint; 27 enum class AccessPoint;
28 } 28 }
29 29
30 namespace sync_driver {
31 class SyncSetupInProgressHandle;
32 }
33
34 class SyncSetupHandler : public options::OptionsPageUIHandler, 30 class SyncSetupHandler : public options::OptionsPageUIHandler,
35 public SyncStartupTracker::Observer, 31 public SyncStartupTracker::Observer,
36 public LoginUIService::LoginUI { 32 public LoginUIService::LoginUI {
37 public: 33 public:
38 SyncSetupHandler(); 34 SyncSetupHandler();
39 ~SyncSetupHandler() override; 35 ~SyncSetupHandler() override;
40 36
41 // OptionsPageUIHandler implementation. 37 // OptionsPageUIHandler implementation.
42 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; 38 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
43 void RegisterMessages() override; 39 void RegisterMessages() override;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // If a wizard already exists, focus it and return true. 146 // If a wizard already exists, focus it and return true.
151 bool FocusExistingWizardIfPresent(); 147 bool FocusExistingWizardIfPresent();
152 148
153 // 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
154 // 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.
155 void DisplayConfigureSync(bool passphrase_failed); 151 void DisplayConfigureSync(bool passphrase_failed);
156 152
157 // Helper object used to wait for the sync backend to startup. 153 // Helper object used to wait for the sync backend to startup.
158 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; 154 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_;
159 155
160 // Prevents Sync from running until configuration is complete.
161 std::unique_ptr<sync_driver::SyncSetupInProgressHandle> sync_blocker_;
162
163 // 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
164 // 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
165 // histograms in the case that the user cancels out. 158 // histograms in the case that the user cancels out.
166 bool configuring_sync_; 159 bool configuring_sync_;
167 160
168 // The OneShotTimer object used to timeout of starting the sync backend 161 // The OneShotTimer object used to timeout of starting the sync backend
169 // service. 162 // service.
170 std::unique_ptr<base::OneShotTimer> backend_start_timer_; 163 std::unique_ptr<base::OneShotTimer> backend_start_timer_;
171 164
172 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); 165 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler);
173 }; 166 };
174 167
175 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ 168 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/browser/ui/webui/options/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698