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

Side by Side Diff: chrome/browser/ui/webui/settings/people_handler.h

Issue 2044303004: Sync: Support multiple setup UIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android 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 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 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 15 matching lines...) Expand all
26 26
27 namespace content { 27 namespace content {
28 class WebContents; 28 class WebContents;
29 class WebUI; 29 class WebUI;
30 } 30 }
31 31
32 namespace signin_metrics { 32 namespace signin_metrics {
33 enum class AccessPoint; 33 enum class AccessPoint;
34 } 34 }
35 35
36 namespace sync_driver {
37 class SyncSetupInProgressHandle;
38 }
39
36 namespace settings { 40 namespace settings {
37 41
38 class PeopleHandler : public SettingsPageUIHandler, 42 class PeopleHandler : public SettingsPageUIHandler,
39 public SigninManagerBase::Observer, 43 public SigninManagerBase::Observer,
40 public SyncStartupTracker::Observer, 44 public SyncStartupTracker::Observer,
41 public LoginUIService::LoginUI, 45 public LoginUIService::LoginUI,
42 public sync_driver::SyncServiceObserver { 46 public sync_driver::SyncServiceObserver {
43 public: 47 public:
44 // TODO(tommycli): Remove these strings and instead use WebUIListener events. 48 // TODO(tommycli): Remove these strings and instead use WebUIListener events.
45 // These string constants are used from JavaScript (sync_browser_proxy.js). 49 // These string constants are used from JavaScript (sync_browser_proxy.js).
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 182
179 // Suppresses any further signin promos, since the user has signed in once. 183 // Suppresses any further signin promos, since the user has signed in once.
180 void MarkFirstSetupComplete(); 184 void MarkFirstSetupComplete();
181 185
182 // Weak pointer. 186 // Weak pointer.
183 Profile* profile_; 187 Profile* profile_;
184 188
185 // Helper object used to wait for the sync backend to startup. 189 // Helper object used to wait for the sync backend to startup.
186 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; 190 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_;
187 191
192 // Handle preventing Sync from running until configuration is complete.
193 std::unique_ptr<sync_driver::SyncSetupInProgressHandle> setup_handle_;
194
188 // Set to true whenever the sync configure UI is visible. This is used to tell 195 // Set to true whenever the sync configure UI is visible. This is used to tell
189 // what stage of the setup wizard the user was in and to update the UMA 196 // what stage of the setup wizard the user was in and to update the UMA
190 // histograms in the case that the user cancels out. 197 // histograms in the case that the user cancels out.
191 bool configuring_sync_; 198 bool configuring_sync_;
192 199
193 // The OneShotTimer object used to timeout of starting the sync backend 200 // The OneShotTimer object used to timeout of starting the sync backend
194 // service. 201 // service.
195 std::unique_ptr<base::OneShotTimer> backend_start_timer_; 202 std::unique_ptr<base::OneShotTimer> backend_start_timer_;
196 203
197 // Used to listen for pref changes to allow or disallow signin. 204 // Used to listen for pref changes to allow or disallow signin.
198 PrefChangeRegistrar profile_pref_registrar_; 205 PrefChangeRegistrar profile_pref_registrar_;
199 206
200 // Manages observer lifetimes. 207 // Manages observer lifetimes.
201 ScopedObserver<SigninManagerBase, PeopleHandler> signin_observer_; 208 ScopedObserver<SigninManagerBase, PeopleHandler> signin_observer_;
202 ScopedObserver<ProfileSyncService, PeopleHandler> sync_service_observer_; 209 ScopedObserver<ProfileSyncService, PeopleHandler> sync_service_observer_;
203 210
204 DISALLOW_COPY_AND_ASSIGN(PeopleHandler); 211 DISALLOW_COPY_AND_ASSIGN(PeopleHandler);
205 }; 212 };
206 213
207 } // namespace settings 214 } // namespace settings
208 215
209 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ 216 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698