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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.h

Issue 19567004: Convert SigninTracker to use OAuth2TokenService notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 3 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 | Annotate | Revision Log
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_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 // Clear all data member of the helper, except for the error. 213 // Clear all data member of the helper, except for the error.
214 void CleanTransientState(); 214 void CleanTransientState();
215 215
216 // Unitests that use a TestingProfile should call this. 216 // Unitests that use a TestingProfile should call this.
217 // Otherwise, clearing the pending e-mail crashes because the code expects 217 // Otherwise, clearing the pending e-mail crashes because the code expects
218 // a real ResourceContext rather than the MockResourceContext a 218 // a real ResourceContext rather than the MockResourceContext a
219 // TestingProfile provides. 219 // TestingProfile provides.
220 void SetDoNotClearPendingEmailForTesting(); 220 void SetDoNotClearPendingEmailForTesting();
221 221
222 // In unit tests, disable starting the actual sync.
223 void set_do_not_start_sync_for_testing();
224
222 // Called when password has been submitted. 225 // Called when password has been submitted.
223 void PasswordSubmitted(const autofill::PasswordForm& form); 226 void PasswordSubmitted(const autofill::PasswordForm& form);
224 227
225 // content::WebContentsObserver overrides. 228 // content::WebContentsObserver overrides.
226 virtual void NavigateToPendingEntry( 229 virtual void NavigateToPendingEntry(
227 const GURL& url, 230 const GURL& url,
228 content::NavigationController::ReloadType reload_type) OVERRIDE; 231 content::NavigationController::ReloadType reload_type) OVERRIDE;
229 virtual void DidNavigateMainFrame( 232 virtual void DidNavigateMainFrame(
230 const content::LoadCommittedDetails& details, 233 const content::LoadCommittedDetails& details,
231 const content::FrameNavigateParams& params) OVERRIDE; 234 const content::FrameNavigateParams& params) OVERRIDE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // Whether a Gaia URL during the sign in process was not handled by the 272 // Whether a Gaia URL during the sign in process was not handled by the
270 // dedicated sign in process (e.g. SAML login, which redirects to a 273 // dedicated sign in process (e.g. SAML login, which redirects to a
271 // non-google-controlled domain). 274 // non-google-controlled domain).
272 // This is set to true if at least one such URL is detected. 275 // This is set to true if at least one such URL is detected.
273 bool untrusted_confirmation_required_; 276 bool untrusted_confirmation_required_;
274 277
275 // Allows unittests to avoid accessing the ResourceContext for clearing a 278 // Allows unittests to avoid accessing the ResourceContext for clearing a
276 // pending e-mail. 279 // pending e-mail.
277 bool do_not_clear_pending_email_; 280 bool do_not_clear_pending_email_;
278 281
282 // Allows unittest to avoid starting sync for real.
283 bool do_not_start_sync_for_testing_;
284
279 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_; 285 base::WeakPtrFactory<OneClickSigninHelper> weak_pointer_factory_;
280 286
281 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); 287 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
282 }; 288 };
283 289
284 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ 290 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_tracker_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698