Commit b72023b7 authored by David Roger's avatar David Roger Committed by Commit Bot

[signin] Delete kAccountConsistencyFeature

Fixed: 777774
Change-Id: I9abee0112f345ea4421c4f809588066f976fc645
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929817
Commit-Queue: David Roger <droger@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718597}
parent 59d16b7f
......@@ -5565,8 +5565,6 @@ static_library("test_support") {
"signin/e2e_tests/test_accounts_util.h",
"signin/identity_test_environment_profile_adaptor.cc",
"signin/identity_test_environment_profile_adaptor.h",
"signin/scoped_account_consistency.cc",
"signin/scoped_account_consistency.h",
"ssl/ssl_client_auth_requestor_mock.cc",
"ssl/ssl_client_auth_requestor_mock.h",
"ssl/tls_deprecation_test_utils.cc",
......
......@@ -14,10 +14,6 @@
#include "components/sync/driver/profile_sync_service.h"
#include "components/sync/test/fake_server/fake_server_network_resources.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/signin/scoped_account_consistency.h"
#endif
#if defined(OS_CHROMEOS)
#include "chrome/browser/signin/identity_manager_factory.h"
#include "components/signin/public/identity_manager/identity_manager.h"
......@@ -27,22 +23,10 @@ namespace browsing_data_counter_utils {
class BrowsingDataCounterUtilsBrowserTest : public SyncTest {
public:
BrowsingDataCounterUtilsBrowserTest()
: SyncTest(SINGLE_CLIENT)
#if defined(OS_CHROMEOS)
,
scoped_mirror_(std::make_unique<ScopedAccountConsistencyMirror>())
#endif
{
}
BrowsingDataCounterUtilsBrowserTest() : SyncTest(SINGLE_CLIENT) {}
~BrowsingDataCounterUtilsBrowserTest() override = default;
private:
#if defined(OS_CHROMEOS)
// Need to manually turn on mirror for now.
const std::unique_ptr<ScopedAccountConsistencyMirror> scoped_mirror_;
#endif
DISALLOW_COPY_AND_ASSIGN(BrowsingDataCounterUtilsBrowserTest);
};
......
......@@ -14,7 +14,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_reconcilor_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/ui/browser.h"
......
......@@ -6,7 +6,6 @@
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/test/base/testing_profile.h"
#include "components/signin/public/base/signin_buildflags.h"
#include "content/public/test/browser_task_environment.h"
......
......@@ -57,10 +57,6 @@
#include "third_party/zlib/google/compression_utils.h"
#include "url/url_constants.h"
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
#include "chrome/browser/signin/scoped_account_consistency.h"
#endif
namespace metrics {
namespace {
......
......@@ -14,7 +14,6 @@
#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
#include "chrome/browser/safe_browsing/test_safe_browsing_service.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/scoped_testing_local_state.h"
......
......@@ -27,13 +27,6 @@
using signin::AccountConsistencyMethod;
// TODO(droger): Verify if this feature flag is still required now that
// DICE migration was enabled by default for all users.
const base::Feature kAccountConsistencyFeature{
"AccountConsistency", base::FEATURE_ENABLED_BY_DEFAULT};
const char kAccountConsistencyFeatureMethodParameter[] = "method";
const char kAccountConsistencyFeatureMethodMirror[] = "mirror";
namespace {
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
......@@ -205,14 +198,8 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod(
return AccountConsistencyMethod::kMirror;
#endif
std::string method_value = base::GetFieldTrialParamValueByFeature(
kAccountConsistencyFeature, kAccountConsistencyFeatureMethodParameter);
#if defined(OS_CHROMEOS)
if (chromeos::IsAccountManagerAvailable(profile))
return AccountConsistencyMethod::kMirror;
return (method_value == kAccountConsistencyFeatureMethodMirror ||
return (chromeos::IsAccountManagerAvailable(profile) ||
profile->GetPrefs()->GetBoolean(
prefs::kAccountConsistencyMirrorRequired))
? AccountConsistencyMethod::kMirror
......
......@@ -20,16 +20,6 @@ class PrefRegistrySyncable;
class Profile;
// Account consistency feature. Only used on platforms where Mirror is not
// always enabled (ENABLE_MIRROR is false).
extern const base::Feature kAccountConsistencyFeature;
// The account consistency method feature parameter name.
extern const char kAccountConsistencyFeatureMethodParameter[];
// Account consistency method feature values.
extern const char kAccountConsistencyFeatureMethodMirror[];
// Manages the account consistency mode for each profile.
class AccountConsistencyModeManager : public KeyedService {
public:
......
......@@ -12,7 +12,6 @@
#include "build/build_config.h"
#include "build/buildflag.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
......
......@@ -9,7 +9,6 @@
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "components/signin/core/browser/signin_header_helper.h"
#include "components/signin/public/base/signin_buildflags.h"
#include "content/public/test/browser_task_environment.h"
......@@ -26,8 +25,11 @@
namespace {
#if BUILDFLAG(ENABLE_MIRROR) || defined(OS_CHROMEOS)
const char kChromeManageAccountsHeader[] = "X-Chrome-Manage-Accounts";
const char kMirrorAction[] = "action=ADDSESSION";
#endif
const GURL kGaiaUrl("https://accounts.google.com");
// URLRequestInterceptor adding a account consistency response header to Gaia
......@@ -125,10 +127,9 @@ TEST_F(ChromeSigninHelperTest, RemoveDiceSigninHeader) {
}
#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
#if BUILDFLAG(ENABLE_MIRROR) || defined(OS_CHROMEOS)
// Tests that user data is set on Mirror requests.
TEST_F(ChromeSigninHelperTest, MirrorMainFrame) {
ScopedAccountConsistencyMirror scoped_mirror;
// Process the header.
TestResponseAdapter response_adapter(kChromeManageAccountsHeader,
kMirrorAction,
......@@ -145,8 +146,6 @@ TEST_F(ChromeSigninHelperTest, MirrorMainFrame) {
// Tests that user data is not set on Mirror requests for sub frames.
TEST_F(ChromeSigninHelperTest, MirrorSubFrame) {
ScopedAccountConsistencyMirror scoped_mirror;
// Process the header.
TestResponseAdapter response_adapter(kChromeManageAccountsHeader,
kMirrorAction,
......@@ -157,3 +156,4 @@ TEST_F(ChromeSigninHelperTest, MirrorSubFrame) {
EXPECT_FALSE(response_adapter.GetUserData(
signin::kManageAccountsHeaderReceivedUserDataKey));
}
#endif // BUILDFLAG(ENABLE_MIRROR) || defined(OS_CHROMEOS)
......@@ -21,7 +21,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/browser/signin/signin_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_paths.h"
......@@ -103,8 +102,6 @@ class MirrorBrowserTest : public InProcessBrowserTest {
// load pages from "www.google.com" without an interstitial.
command_line->AppendSwitch(switches::kIgnoreCertificateErrors);
}
ScopedAccountConsistencyMirror scoped_mirror_;
};
// Verify the following items:
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/signin/scoped_account_consistency.h"
#include <map>
#include <string>
#include <utility>
#include "base/feature_list.h"
#include "base/logging.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "components/signin/public/base/signin_buildflags.h"
using signin::AccountConsistencyMethod;
ScopedAccountConsistencyMirror::ScopedAccountConsistencyMirror() {
#if BUILDFLAG(ENABLE_MIRROR)
return;
#endif
std::map<std::string, std::string> feature_params;
feature_params[kAccountConsistencyFeatureMethodParameter] =
kAccountConsistencyFeatureMethodMirror;
scoped_feature_list_.InitAndEnableFeatureWithParameters(
kAccountConsistencyFeature, feature_params);
}
ScopedAccountConsistencyMirror::~ScopedAccountConsistencyMirror() {}
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_SIGNIN_SCOPED_ACCOUNT_CONSISTENCY_H_
#define CHROME_BROWSER_SIGNIN_SCOPED_ACCOUNT_CONSISTENCY_H_
#include <memory>
#include "base/macros.h"
#include "base/test/scoped_feature_list.h"
#include "components/signin/public/base/account_consistency_method.h"
// Changes the account consistency method while it is in scope. Useful for
// tests.
class ScopedAccountConsistencyMirror {
public:
ScopedAccountConsistencyMirror();
~ScopedAccountConsistencyMirror();
private:
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(ScopedAccountConsistencyMirror);
};
#endif // CHROME_BROWSER_SIGNIN_SCOPED_ACCOUNT_CONSISTENCY_H_
......@@ -20,7 +20,6 @@
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/browser/signin/signin_error_controller_factory.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/chrome_pages.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment