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

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

Issue 120343004: Reland r242290, r241609, r242134. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 9953c60091ed0df06b7245bdbf74e97c80335bbe..cbc98ba00356e14f8fa726653af6d0f7c56958d7 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.h
+++ b/chrome/browser/ui/sync/one_click_signin_helper.h
@@ -123,6 +123,21 @@ class OneClickSigninHelper
int child_id,
int route_id);
+ // Handles cross account sign in error. If the supplied |email| does not match
+ // the last signed in email of the current profile, then Chrome will show a
+ // confirmation dialog before starting sync. It returns true if there is a
+ // cross ccount error, and false otherwise.
+ static bool HandleCrossAccountError(
+ content::WebContents* contents,
+ const std::string& session_index,
+ const std::string& email,
+ const std::string& password,
+ const std::string& oauth_code,
+ OneClickSigninHelper::AutoAccept auto_accept,
+ signin::Source source,
+ OneClickSigninSyncStarter::StartSyncMode start_mode,
+ OneClickSigninSyncStarter::Callback sync_callback);
+
// If the |source| is not settings page/webstore, redirects to
// the NTP/Apps page.
static void RedirectToNtpOrAppsPageIfNecessary(
@@ -161,8 +176,6 @@ class OneClickSigninHelper
FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
CanOfferOnIOThreadBadURL);
FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
- CanOfferOnIOThreadReferrer);
- FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
CanOfferOnIOThreadDisabled);
FRIEND_TEST_ALL_PREFIXES(OneClickSigninHelperIOTest,
CanOfferOnIOThreadSignedIn);
@@ -194,7 +207,6 @@ class OneClickSigninHelper
// origin of |url| is a valid Gaia sign in origin. This function is meant
// to called only from the IO thread.
static Offer CanOfferOnIOThreadImpl(const GURL& url,
- const std::string& referrer,
base::SupportsUserData* request,
ProfileIOData* io_data);

Powered by Google App Engine
This is Rietveld 408576698