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"; |