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

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

Issue 99913004: Add error handling to inline signin flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: roger's comments fixed 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.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index 94b1de39a386b4adda1f393f88c3dc557adc2cd8..9c52e642ff883fdaa5bf983f0341f5c0a2699ebb 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -365,16 +365,6 @@ void RedirectToNtpOrAppsPageWithIds(int child_id,
RedirectToNtpOrAppsPage(web_contents, source);
}
-// If the |source| is not settings page/webstore, redirects to
-// the NTP/Apps page.
-void RedirectToNtpOrAppsPageIfNecessary(content::WebContents* contents,
- signin::Source source) {
- if (source != signin::SOURCE_SETTINGS &&
- source != signin::SOURCE_WEBSTORE_INSTALL) {
- RedirectToNtpOrAppsPage(contents, source);
- }
-}
-
// Start syncing with the given user information.
void StartSync(const StartSyncArgs& args,
OneClickSigninSyncStarter::StartSyncMode start_mode) {
@@ -419,7 +409,8 @@ void StartExplicitSync(const StartSyncArgs& args,
ConfirmEmailDialogDelegate::Action action) {
if (action == ConfirmEmailDialogDelegate::START_SYNC) {
StartSync(args, start_mode);
- RedirectToNtpOrAppsPageIfNecessary(contents, args.source);
+ OneClickSigninHelper::RedirectToNtpOrAppsPageIfNecessary(
+ contents, args.source);
} else {
// Perform a redirection to the NTP/Apps page to hide the blank page when
// the action is CLOSE or CREATE_NEW_USER. The redirection is useful when
@@ -1028,6 +1019,7 @@ void OneClickSigninHelper::RemoveSigninRedirectURLHistoryItem(
}
}
+// static
void OneClickSigninHelper::ShowSigninErrorBubble(Browser* browser,
const std::string& error) {
DCHECK(!error.empty());
@@ -1042,6 +1034,15 @@ void OneClickSigninHelper::ShowSigninErrorBubble(Browser* browser,
BrowserWindow::StartSyncCallback());
}
+// static
+void OneClickSigninHelper::RedirectToNtpOrAppsPageIfNecessary(
+ content::WebContents* contents, signin::Source source) {
+ if (source != signin::SOURCE_SETTINGS &&
+ source != signin::SOURCE_WEBSTORE_INSTALL) {
+ RedirectToNtpOrAppsPage(contents, source);
+ }
+}
+
void OneClickSigninHelper::RedirectToSignin() {
VLOG(1) << "OneClickSigninHelper::RedirectToSignin";
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.h ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698