Skip to content

Commit

Permalink
Disconnect one click sign in code. The code itself will be removed in…
Browse files Browse the repository at this point in the history
… followup

CLs.

BUG=260022,350202

Review URL: https://codereview.chromium.org/872433006

Cr-Commit-Position: refs/heads/master@{#317664}
  • Loading branch information
rogerta authored and Commit bot committed Feb 23, 2015
1 parent 22f26db commit d32a8c3
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 562 deletions.
6 changes: 0 additions & 6 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -14266,12 +14266,6 @@ Do you accept?
Enables the new avatar menu. When combined with new-profile-management, it simply shows the new profile management avatar menu. Otherwise it shows a redesigned avatar menu with the same functionality as the old one, plus a tutorial card at the top prompting the user to try out the new profile management UI.
</message>

<message name="IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME" desc="Title for the flag to enable web-based sign-in flows.">
Enable pure web-based sign-in flows
</message>
<message name="IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION" desc="Description for the flag to enable web-based sign-in flows">
When enabled, will use a pure web-based sign-in flow on first run/NTP/wrench menu/settings page. Otherwise use a native flow with embedded webview.
</message>
<message name="IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME" desc="Title for the flag to enable iframe-based sign-in flows.">
Enables iframe-based Chrome sign-in flows. This flag overrides --enable-web-based-signin.
</message>
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1434,13 +1434,6 @@ const Experiment kExperiments[] = {
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu,
switches::kDisableNewAvatarMenu)
},
{
"enable-web-based-signin",
IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
kOsMac | kOsWin | kOsLinux,
SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
},
{
"enable-iframe-based-signin",
IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME,
Expand Down
7 changes: 2 additions & 5 deletions chrome/browser/chrome_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,7 @@ std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite(
// SiteInstance URL - "chrome-guest://app_id/persist?partition".
if (site.SchemeIs(content::kGuestScheme)) {
partition_id = site.spec();
} else if (site.GetOrigin().spec() == kChromeUIChromeSigninURL &&
!switches::IsEnableWebviewBasedSignin()) {
} else if (site.GetOrigin().spec() == kChromeUIChromeSigninURL) {
// Chrome signin page has an embedded iframe of extension and web content,
// thus it must be isolated from other webUI pages.
partition_id = site.GetOrigin().spec();
Expand Down Expand Up @@ -870,8 +869,7 @@ void ChromeContentBrowserClient::GetStoragePartitionConfigForSite(
}
#endif

if (!success && (site.GetOrigin().spec() == kChromeUIChromeSigninURL) &&
!switches::IsEnableWebviewBasedSignin()) {
if (!success && (site.GetOrigin().spec() == kChromeUIChromeSigninURL)) {
// Chrome signin page has an embedded iframe of extension and web content,
// thus it must be isolated from other webUI pages.
*partition_domain = chrome::kChromeUIChromeSigninHost;
Expand Down Expand Up @@ -1470,7 +1468,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kEnableOutOfProcessPdf,
switches::kEnablePluginPlaceholderShadowDom,
switches::kEnableShowModalDialog,
switches::kEnableWebBasedSignin,
switches::kJavaScriptHarmony,
switches::kMessageLoopHistogrammer,
switches::kPlaybackMode,
Expand Down
10 changes: 4 additions & 6 deletions chrome/browser/first_run/first_run.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_promo.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/chrome_pages.h"
Expand Down Expand Up @@ -365,15 +364,14 @@ void FirstRunBubbleLauncher::Observe(
content::WebContents* contents =
browser->tab_strip_model()->GetActiveWebContents();

// Suppress the first run bubble if a Gaia sign in page, the continue
// URL for the sign in page or the sync setup page is showing.
// Suppress the first run bubble if a Gaia sign in page or the sync setup
// page is showing.
if (contents &&
(contents->GetURL().GetOrigin().spec() ==
chrome::kChromeUIChromeSigninURL ||
gaia::IsGaiaSignonRealm(contents->GetURL().GetOrigin()) ||
signin::IsContinueUrlForWebBasedSigninFlow(contents->GetURL()) ||
(contents->GetURL() ==
chrome::GetSettingsUrl(chrome::kSyncSetupSubPage)))) {
contents->GetURL() ==
chrome::GetSettingsUrl(chrome::kSyncSetupSubPage))) {
return;
}

Expand Down
25 changes: 0 additions & 25 deletions chrome/browser/password_manager/save_password_infobar_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,16 @@
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/infobar.h"
#include "components/password_manager/core/browser/password_form_manager.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "google_apis/gaia/gaia_urls.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"

#if defined(ENABLE_ONE_CLICK_SIGNIN)
#include "chrome/browser/ui/sync/one_click_signin_helper.h"
#endif

// static
void SavePasswordInfoBarDelegate::Create(
content::WebContents* web_contents,
scoped_ptr<password_manager::PasswordFormManager> form_to_save,
const std::string& uma_histogram_suffix) {
#if defined(ENABLE_ONE_CLICK_SIGNIN)
// Don't show the password manager infobar if this form is for a google
// account and we are going to show the one-click signin infobar.
GURL realm(form_to_save->realm());
// TODO(mathp): Checking only against associated_username() causes a bug
// referenced here: crbug.com/133275
// TODO(vabr): The check IsEnableWebBasedSignin is a hack for the time when
// OneClickSignin is disabled. http://crbug.com/339804
if (((realm == GaiaUrls::GetInstance()->gaia_login_form_realm()) ||
(realm == GURL("https://www.google.com/"))) &&
switches::IsEnableWebBasedSignin() &&
OneClickSigninHelper::CanOffer(
web_contents,
OneClickSigninHelper::CAN_OFFER_FOR_INTERSTITAL_ONLY,
base::UTF16ToUTF8(form_to_save->associated_username()),
NULL))
return;
#endif

InfoBarService* infobar_service =
InfoBarService::FromWebContents(web_contents);
infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
Expand Down
14 changes: 0 additions & 14 deletions chrome/browser/policy/chrome_browser_policy_connector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "components/policy/core/common/policy_namespace.h"
#include "components/policy/core/common/policy_service.h"
#include "components/policy/core/common/policy_types.h"
#include "components/signin/core/common/signin_switches.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "net/url_request/url_request_context_getter.h"
Expand Down Expand Up @@ -89,8 +88,6 @@ void ChromeBrowserPolicyConnector::Init(

BrowserPolicyConnector::Init(
local_state, request_context, device_management_service.Pass());

AppendExtraFlagsPerPolicy();
}

ConfigurationPolicyProvider*
Expand Down Expand Up @@ -128,18 +125,7 @@ void ChromeBrowserPolicyConnector::AppendExtraFlagsPerPolicy() {
PolicyService* policy_service = GetPolicyService();
PolicyNamespace chrome_ns = PolicyNamespace(POLICY_DOMAIN_CHROME, "");
const PolicyMap& chrome_policy = policy_service->GetPolicies(chrome_ns);
const base::Value* policy_value =
chrome_policy.GetValue(key::kEnableDeprecatedWebBasedSignin);
bool enabled = false;
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (policy_value && policy_value->GetAsBoolean(&enabled) && enabled) {
if (!command_line->HasSwitch(switches::kEnableWebBasedSignin))
command_line->AppendSwitch(switches::kEnableWebBasedSignin);
// In M41, to fully enable web-based sign in, the kEnableIframeBasedSignin
// must also be specified.
if (!command_line->HasSwitch(switches::kEnableIframeBasedSignin))
command_line->AppendSwitch(switches::kEnableIframeBasedSignin);
}

if (command_line->HasSwitch(switches::kEnableNpapi))
return;
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/policy/chrome_browser_policy_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
private:
ConfigurationPolicyProvider* CreatePlatformProvider();

// Appends any required flags if certain policies are set.
// TODO(guohui): Needs to move this to a more proper place and also to handle
// dynamic refresh.
void AppendExtraFlagsPerPolicy();

DISALLOW_COPY_AND_ASSIGN(ChromeBrowserPolicyConnector);
Expand Down
5 changes: 1 addition & 4 deletions chrome/browser/signin/chrome_signin_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,7 @@ net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() {
}

bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() {
// If inline sign in is enabled, but account consistency is not, the user's
// credentials should be merge into the cookie jar.
return !switches::IsEnableWebBasedSignin() &&
!switches::IsEnableAccountConsistency();
return !switches::IsEnableAccountConsistency();
}

std::string ChromeSigninClient::GetProductVersion() {
Expand Down
Loading

0 comments on commit d32a8c3

Please sign in to comment.