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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper.h

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/sync/one_click_signin_helper.h
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.h b/chrome/browser/ui/sync/one_click_signin_helper.h
index 0d3e96e1854b2de6c8fa8d47b29fe8a1e5fe17a2..8bd48c0e183043766d2841edb2bb6d20f3822012 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.h
+++ b/chrome/browser/ui/sync/one_click_signin_helper.h
@@ -196,6 +196,12 @@ class OneClickSigninHelper
// Clear all data member of the helper, except for the error.
void CleanTransientState();
+ // Unitests that use a TestingProfile should call this.
+ // Otherwise, clearing the pending e-mail crashes because the code expects
+ // a real ResourceContext rather than the MockResourceContext a
+ // TestingProfile provides.
+ void SetDoNotClearPendingEmailForTesting();
+
// Grab Gaia password if available.
bool OnFormSubmitted(const content::PasswordForm& form);
@@ -242,6 +248,10 @@ class OneClickSigninHelper
// This is set to true if at least one such URL is detected.
bool untrusted_confirmation_required_;
+ // Allows unittests to avoid accessing the ResourceContext for clearing a
+ // pending e-mail.
+ bool do_not_clear_pending_email_;
+
DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper);
};
« no previous file with comments | « chrome/browser/ui/find_bar/find_backend_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