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

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

Issue 10539128: Set timeout in sync setup (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed commented points Created 8 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_SYNC_SETUP_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/timer.h"
10 #include "chrome/browser/signin/signin_tracker.h" 11 #include "chrome/browser/signin/signin_tracker.h"
11 #include "chrome/browser/ui/webui/options2/options_ui2.h" 12 #include "chrome/browser/ui/webui/options2/options_ui2.h"
12 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 13 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
13 14
14 class LoginUIService; 15 class LoginUIService;
15 class ProfileManager; 16 class ProfileManager;
16 class ProfileSyncService; 17 class ProfileSyncService;
17 class SigninManager; 18 class SigninManager;
18 19
19 class SyncSetupHandler : public options2::OptionsPageUIHandler, 20 class SyncSetupHandler : public options2::OptionsPageUIHandler,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Instead of signing in, prepare requirements for showing the advanced 133 // Instead of signing in, prepare requirements for showing the advanced
133 // configuration dialog. 134 // configuration dialog.
134 void PrepareConfigDialog(); 135 void PrepareConfigDialog();
135 136
136 // Displays spinner-only UI indicating that something is going on in the 137 // Displays spinner-only UI indicating that something is going on in the
137 // background. 138 // background.
138 // TODO(kochi): better to show some message that the user can understand what 139 // TODO(kochi): better to show some message that the user can understand what
139 // is running in the background. 140 // is running in the background.
140 void DisplaySpinner(); 141 void DisplaySpinner();
141 142
143 // Displays an error dialog which shows timeout of starting the sync backend.
144 void DisplayTimeout();
145
142 // Returns true if we're the active login object. 146 // Returns true if we're the active login object.
143 bool IsActiveLogin() const; 147 bool IsActiveLogin() const;
144 148
145 // Initiates a login via the signin manager. 149 // Initiates a login via the signin manager.
146 void TryLogin(const std::string& username, 150 void TryLogin(const std::string& username,
147 const std::string& password, 151 const std::string& password,
148 const std::string& captcha, 152 const std::string& captcha,
149 const std::string& access_code); 153 const std::string& access_code);
150 154
151 // If a wizard already exists, focus it and return true. 155 // If a wizard already exists, focus it and return true.
(...skipping 27 matching lines...) Expand all
179 183
180 // Weak reference to the profile manager. 184 // Weak reference to the profile manager.
181 ProfileManager* const profile_manager_; 185 ProfileManager* const profile_manager_;
182 186
183 // Cache of the last name the client attempted to authenticate. 187 // Cache of the last name the client attempted to authenticate.
184 std::string last_attempted_user_email_; 188 std::string last_attempted_user_email_;
185 189
186 // The error from the last signin attempt. 190 // The error from the last signin attempt.
187 GoogleServiceAuthError last_signin_error_; 191 GoogleServiceAuthError last_signin_error_;
188 192
193 // The OneShotTimer object used to timeout of starting the sync backend
194 // service.
195 scoped_ptr<base::OneShotTimer<SyncSetupHandler> > backend_start_timer_;
196
189 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); 197 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler);
190 }; 198 };
191 199
192 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ 200 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698