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

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

Issue 579033002: [Clean-up] Remove some dead code for handling Webstore sign-in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 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 1118fab9a137a121acd7c212226c681631b1fbbd..276b23c47bc415a335000ff0d0db5bccc7c4423a 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -528,9 +528,8 @@ OneClickSigninHelper::StartSyncArgs::StartSyncArgs(
DCHECK(session_index.empty() != refresh_token.empty());
if (untrusted_confirmation_required) {
confirmation_required = OneClickSigninSyncStarter::CONFIRM_UNTRUSTED_SIGNIN;
- } else if (source == signin::SOURCE_SETTINGS ||
- source == signin::SOURCE_WEBSTORE_INSTALL) {
- // Do not display a status confirmation for webstore installs or re-auth.
+ } else if (source == signin::SOURCE_SETTINGS) {
+ // Do not display a status confirmation for re-auth.
confirmation_required = OneClickSigninSyncStarter::NO_CONFIRMATION;
} else {
confirmation_required = OneClickSigninSyncStarter::CONFIRM_AFTER_SIGNIN;
@@ -727,10 +726,6 @@ void OneClickSigninHelper::LogHistogramValue(
UMA_HISTOGRAM_ENUMERATION("Signin.ExtensionInstallBubbleActions", action,
one_click_signin::HISTOGRAM_MAX);
break;
- case signin::SOURCE_WEBSTORE_INSTALL:
- UMA_HISTOGRAM_ENUMERATION("Signin.WebstoreInstallActions", action,
- one_click_signin::HISTOGRAM_MAX);
- break;
case signin::SOURCE_APP_LAUNCHER:
UMA_HISTOGRAM_ENUMERATION("Signin.AppLauncherActions", action,
one_click_signin::HISTOGRAM_MAX);
@@ -761,7 +756,7 @@ void OneClickSigninHelper::LogHistogramValue(
break;
default:
// This switch statement needs to be updated when the enum Source changes.
- COMPILE_ASSERT(signin::SOURCE_UNKNOWN == 13,
+ COMPILE_ASSERT(signin::SOURCE_UNKNOWN == 12,
kSourceEnumHasChangedButNotThisSwitchStatement);
UMA_HISTOGRAM_ENUMERATION("Signin.UnknownActions", action,
one_click_signin::HISTOGRAM_MAX);
@@ -1212,8 +1207,7 @@ void OneClickSigninHelper::RedirectToNtpOrAppsPage(
// static
void OneClickSigninHelper::RedirectToNtpOrAppsPageIfNecessary(
content::WebContents* contents, signin::Source source) {
- if (source != signin::SOURCE_SETTINGS &&
- source != signin::SOURCE_WEBSTORE_INSTALL) {
+ if (source != signin::SOURCE_SETTINGS) {
RedirectToNtpOrAppsPage(contents, source);
}
}
@@ -1555,13 +1549,10 @@ void OneClickSigninHelper::DidStopLoading(
RedirectToNtpOrAppsPageIfNecessary(web_contents(), source_);
}
- // Observe the sync service if the Webstore tab or the settings tab
- // requested a gaia sign in, so that when sign in and sync setup are
- // successful, we can redirect to the correct URL, or auto-close the gaia
- // sign in tab.
- if (original_source == signin::SOURCE_SETTINGS ||
- (original_source == signin::SOURCE_WEBSTORE_INSTALL &&
- source_ == signin::SOURCE_SETTINGS)) {
+ // Observe the sync service if the settings tab requested a gaia sign in,
+ // so that when sign in and sync setup are successful, we can redirect to
+ // the correct URL, or auto-close the gaia sign in tab.
+ if (original_source == signin::SOURCE_SETTINGS) {
// The observer deletes itself once it's done.
new OneClickSigninSyncObserver(contents, original_continue_url_);
}
« no previous file with comments | « chrome/browser/signin/signin_promo_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698