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

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

Issue 1984863002: Clean up LoginUIService. Remove Singleton behavior from PeopleHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync and add datatype push update notifications Created 4 years, 7 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"
(...skipping 26 matching lines...) Expand all
37 // OptionsPageUIHandler implementation. 37 // OptionsPageUIHandler implementation.
38 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; 38 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
39 void RegisterMessages() override; 39 void RegisterMessages() override;
40 40
41 // SyncStartupTracker::Observer implementation; 41 // SyncStartupTracker::Observer implementation;
42 void SyncStartupCompleted() override; 42 void SyncStartupCompleted() override;
43 void SyncStartupFailed() override; 43 void SyncStartupFailed() override;
44 44
45 // LoginUIService::LoginUI implementation. 45 // LoginUIService::LoginUI implementation.
46 void FocusUI() override; 46 void FocusUI() override;
47 void CloseUI() override;
48 47
49 static void GetStaticLocalizedValues( 48 static void GetStaticLocalizedValues(
50 base::DictionaryValue* localized_strings, 49 base::DictionaryValue* localized_strings,
51 content::WebUI* web_ui); 50 content::WebUI* web_ui);
52 51
53 // Initializes the sync setup flow and shows the setup UI. 52 // Initializes the sync setup flow and shows the setup UI.
54 void OpenSyncSetup(bool creating_supervised_user); 53 void OpenSyncSetup(bool creating_supervised_user);
55 54
56 // Shows advanced configuration dialog without going through sign in dialog. 55 // Shows advanced configuration dialog without going through sign in dialog.
57 // Kicks the sync backend if necessary with showing spinner dialog until it 56 // Kicks the sync backend if necessary with showing spinner dialog until it
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 129
131 // Displays spinner-only UI indicating that something is going on in the 130 // Displays spinner-only UI indicating that something is going on in the
132 // background. 131 // background.
133 // TODO(kochi): better to show some message that the user can understand what 132 // TODO(kochi): better to show some message that the user can understand what
134 // is running in the background. 133 // is running in the background.
135 void DisplaySpinner(); 134 void DisplaySpinner();
136 135
137 // Displays an error dialog which shows timeout of starting the sync backend. 136 // Displays an error dialog which shows timeout of starting the sync backend.
138 void DisplayTimeout(); 137 void DisplayTimeout();
139 138
139 // Closes the associated sync settings page.
140 void CloseUI();
141
140 // Returns true if this object is the active login object. 142 // Returns true if this object is the active login object.
141 bool IsActiveLogin() const; 143 bool IsActiveLogin() const;
142 144
143 // If a wizard already exists, return true. Otherwise, return false. 145 // If a wizard already exists, return true. Otherwise, return false.
144 bool IsExistingWizardPresent(); 146 bool IsExistingWizardPresent();
145 147
146 // If a wizard already exists, focus it and return true. 148 // If a wizard already exists, focus it and return true.
147 bool FocusExistingWizardIfPresent(); 149 bool FocusExistingWizardIfPresent();
148 150
149 // Display the configure sync UI. If |passphrase_failed| is true, the account 151 // Display the configure sync UI. If |passphrase_failed| is true, the account
150 // requires a passphrase and one hasn't been provided or it was invalid. 152 // requires a passphrase and one hasn't been provided or it was invalid.
151 void DisplayConfigureSync(bool passphrase_failed); 153 void DisplayConfigureSync(bool passphrase_failed);
152 154
153 // Helper object used to wait for the sync backend to startup. 155 // Helper object used to wait for the sync backend to startup.
154 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_; 156 std::unique_ptr<SyncStartupTracker> sync_startup_tracker_;
155 157
156 // Set to true whenever the sync configure UI is visible. This is used to tell 158 // Set to true whenever the sync configure UI is visible. This is used to tell
157 // what stage of the setup wizard the user was in and to update the UMA 159 // what stage of the setup wizard the user was in and to update the UMA
158 // histograms in the case that the user cancels out. 160 // histograms in the case that the user cancels out.
159 bool configuring_sync_; 161 bool configuring_sync_;
160 162
161 // The OneShotTimer object used to timeout of starting the sync backend 163 // The OneShotTimer object used to timeout of starting the sync backend
162 // service. 164 // service.
163 std::unique_ptr<base::OneShotTimer> backend_start_timer_; 165 std::unique_ptr<base::OneShotTimer> backend_start_timer_;
164 166
165 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); 167 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler);
166 }; 168 };
167 169
168 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ 170 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698