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

[signin] Use AccountConsistencyModeManager

This CL converts almost all the remaining code to use
AccountConsistencyModeManager. There are a few calls left in tests and
debugging code, which will be converted in a follow-up CL.

TBR=stevenjb

Bug: 777774
Change-Id: Ic2da79f6b332880e2143425c91ab50322b9d542f
Reviewed-on: https://chromium-review.googlesource.com/1099069
Commit-Queue: David Roger <droger@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568000}
parent fdd303ce
......@@ -117,9 +117,6 @@ class DiceURLRequestUserData : public base::SupportsUserData::Data {
// Attaches a DiceURLRequestUserData to the request if it needs to block the
// AccountReconcilor.
static void AttachToRequest(net::URLRequest* request) {
if (!IsDicePrepareMigrationEnabled())
return;
if (ShouldBlockReconcilorForRequest(request) &&
!request->GetUserData(kDiceURLRequestUserDataKey)) {
const content::ResourceRequestInfo* info =
......@@ -165,7 +162,6 @@ class DiceURLRequestUserData : public base::SupportsUserData::Data {
// * Main frame requests.
// * XHR requests having Gaia URL as referrer.
static bool ShouldBlockReconcilorForRequest(net::URLRequest* request) {
DCHECK(IsDicePrepareMigrationEnabled());
const content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request);
content::ResourceType resource_type = info->GetResourceType();
......@@ -296,7 +292,6 @@ void ProcessDiceHeaderUIThread(
const content::ResourceRequestInfo::WebContentsGetter&
web_contents_getter) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(IsDiceFixAuthErrorsEnabled());
content::WebContents* web_contents = web_contents_getter.Run();
if (!web_contents)
......@@ -306,6 +301,14 @@ void ProcessDiceHeaderUIThread(
Profile::FromBrowserContext(web_contents->GetBrowserContext());
DCHECK(!profile->IsOffTheRecord());
AccountConsistencyMethod account_consistency =
AccountConsistencyModeManager::GetMethodForProfile(profile);
if (account_consistency == AccountConsistencyMethod::kMirror ||
account_consistency == AccountConsistencyMethod::kDisabled) {
// Ignore Dice response headers if Dice is not enabled at all.
return;
}
signin_metrics::AccessPoint access_point =
signin_metrics::AccessPoint::ACCESS_POINT_UNKNOWN;
signin_metrics::PromoAction promo_action =
......@@ -314,7 +317,7 @@ void ProcessDiceHeaderUIThread(
bool is_sync_signin_tab = false;
DiceTabHelper* tab_helper = DiceTabHelper::FromWebContents(web_contents);
if (signin::IsDicePrepareMigrationEnabled() && tab_helper) {
if (tab_helper) {
is_sync_signin_tab = true;
access_point = tab_helper->signin_access_point();
promo_action = tab_helper->signin_promo_action();
......@@ -326,7 +329,7 @@ void ProcessDiceHeaderUIThread(
dice_response_handler->ProcessDiceHeader(
dice_params,
std::make_unique<ProcessDiceHeaderDelegateImpl>(
web_contents, profile->GetPrefs(),
web_contents, account_consistency,
SigninManagerFactory::GetForProfile(profile), is_sync_signin_tab,
base::BindOnce(&CreateDiceTurnOnSyncHelper, base::Unretained(profile),
access_point, promo_action, reason),
......@@ -385,16 +388,9 @@ void ProcessDiceResponseHeaderIfExists(net::URLRequest* request,
if (is_off_the_record)
return;
const content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request);
if (!gaia::IsGaiaSignonRealm(request->url().GetOrigin()))
return;
if (!IsDiceFixAuthErrorsEnabled()) {
return;
}
net::HttpResponseHeaders* response_headers = request->response_headers();
if (!response_headers)
return;
......@@ -417,6 +413,8 @@ void ProcessDiceResponseHeaderIfExists(net::URLRequest* request,
if (params.user_intention == DiceAction::NONE)
return;
const content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request);
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(ProcessDiceHeaderUIThread, base::Passed(std::move(params)),
......
......@@ -21,6 +21,7 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/signin/account_reconcilor_factory.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/chrome_signin_helper.h"
......@@ -151,11 +152,13 @@ std::unique_ptr<HttpResponse> HandleSigninURL(
// Add the SIGNIN dice header.
std::unique_ptr<BasicHttpResponse> http_response(new BasicHttpResponse);
http_response->AddCustomHeader(
kDiceResponseHeader,
base::StringPrintf(
"action=SIGNIN,authuser=1,id=%s,email=%s,authorization_code=%s",
kMainGaiaID, kMainEmail, kAuthorizationCode));
if (header_value != kNoDiceRequestHeader) {
http_response->AddCustomHeader(
kDiceResponseHeader,
base::StringPrintf(
"action=SIGNIN,authuser=1,id=%s,email=%s,authorization_code=%s",
kMainGaiaID, kMainEmail, kAuthorizationCode));
}
// When hitting the Chrome Sync endpoint, redirect to kEnableSyncURL, which
// adds the ENABLE_SYNC dice header.
......@@ -392,7 +395,12 @@ class DiceBrowserTestBase : public InProcessBrowserTest,
// Navigate to a Gaia URL setting the Google-Accounts-SignOut header.
void SignOutWithDice(SignoutType signout_type) {
NavigateToURL(base::StringPrintf("%s?%i", kSignoutURL, signout_type));
if (signin::IsDicePrepareMigrationEnabled()) {
signin::AccountConsistencyMethod account_consistency =
AccountConsistencyModeManager::GetMethodForProfile(
browser()->profile());
if (signin::DiceMethodGreaterOrEqual(
account_consistency,
signin::AccountConsistencyMethod::kDicePrepareMigration)) {
EXPECT_EQ(1, reconcilor_blocked_count_);
WaitForReconcilorUnblockedCount(1);
} else {
......@@ -474,7 +482,8 @@ class DiceBrowserTestBase : public InProcessBrowserTest,
// FakeGaia callbacks:
void OnSigninRequest(const std::string& dice_request_header) {
EXPECT_EQ(signin::IsDicePrepareMigrationEnabled(), IsReconcilorBlocked());
EXPECT_EQ(dice_request_header != kNoDiceRequestHeader,
IsReconcilorBlocked());
dice_request_header_ = dice_request_header;
}
......@@ -484,7 +493,7 @@ class DiceBrowserTestBase : public InProcessBrowserTest,
}
void OnEnableSyncRequest(base::OnceClosure unblock_response_closure) {
EXPECT_EQ(signin::IsDicePrepareMigrationEnabled(), IsReconcilorBlocked());
EXPECT_TRUE(IsReconcilorBlocked());
enable_sync_requested_ = true;
RunClosureIfValid(std::move(enable_sync_requested_quit_closure_));
unblock_enable_sync_response_closure_ = std::move(unblock_response_closure);
......@@ -493,7 +502,7 @@ class DiceBrowserTestBase : public InProcessBrowserTest,
void OnTokenExchangeRequest(base::OnceClosure unblock_response_closure) {
// The token must be exchanged only once.
EXPECT_FALSE(token_requested_);
EXPECT_EQ(signin::IsDicePrepareMigrationEnabled(), IsReconcilorBlocked());
EXPECT_TRUE(IsReconcilorBlocked());
token_requested_ = true;
RunClosureIfValid(std::move(token_requested_quit_closure_));
unblock_token_exchange_response_closure_ =
......@@ -845,8 +854,8 @@ IN_PROC_BROWSER_TEST_F(DiceFixAuthErrorsBrowserTest, SigninAccountMismatch) {
EXPECT_FALSE(refresh_token_available_);
EXPECT_EQ(GetSecondaryAccountID(),
GetSigninManager()->GetAuthenticatedAccountId());
EXPECT_EQ(0, reconcilor_blocked_count_);
WaitForReconcilorUnblockedCount(0);
EXPECT_EQ(1, reconcilor_blocked_count_);
WaitForReconcilorUnblockedCount(1);
}
// Checks that signin on Gaia triggers the fetch for a refresh token when there
......@@ -877,8 +886,8 @@ IN_PROC_BROWSER_TEST_F(DiceFixAuthErrorsBrowserTest, ReauthFixAuthError) {
// Old token must be revoked silently.
EXPECT_EQ(0, token_revoked_notification_count_);
WaitForTokenRevokedCount(1);
EXPECT_EQ(0, reconcilor_blocked_count_);
WaitForReconcilorUnblockedCount(0);
EXPECT_EQ(1, reconcilor_blocked_count_);
WaitForReconcilorUnblockedCount(1);
}
// Checks that the Dice signout flow is disabled.
......
......@@ -170,8 +170,7 @@ DiceResponseHandler::DiceTokenFetcher::DiceTokenFetcher(
SigninClient* signin_client,
AccountReconcilor* account_reconcilor,
std::unique_ptr<ProcessDiceHeaderDelegate> delegate,
DiceResponseHandler* dice_response_handler,
signin::AccountConsistencyMethod account_consistency)
DiceResponseHandler* dice_response_handler)
: gaia_id_(gaia_id),
email_(email),
authorization_code_(authorization_code),
......@@ -182,12 +181,8 @@ DiceResponseHandler::DiceTokenFetcher::DiceTokenFetcher(
base::Unretained(this))),
should_enable_sync_(false) {
DCHECK(dice_response_handler_);
if (signin::DiceMethodGreaterOrEqual(
account_consistency,
signin::AccountConsistencyMethod::kDicePrepareMigration)) {
account_reconcilor_lock_ =
std::make_unique<AccountReconcilor::Lock>(account_reconcilor);
}
account_reconcilor_lock_ =
std::make_unique<AccountReconcilor::Lock>(account_reconcilor);
gaia_auth_fetcher_ = signin_client->CreateGaiaAuthFetcher(
this, GaiaConstants::kChromeSource,
signin_client->GetURLRequestContext());
......@@ -346,7 +341,7 @@ void DiceResponseHandler::ProcessDiceSigninHeader(
}
token_fetchers_.push_back(std::make_unique<DiceTokenFetcher>(
gaia_id, email, authorization_code, signin_client_, account_reconcilor_,
std::move(delegate), this, account_consistency_));
std::move(delegate), this));
}
void DiceResponseHandler::ProcessEnableSyncHeader(
......
......@@ -80,8 +80,7 @@ class DiceResponseHandler : public KeyedService {
SigninClient* signin_client,
AccountReconcilor* account_reconcilor,
std::unique_ptr<ProcessDiceHeaderDelegate> delegate,
DiceResponseHandler* dice_response_handler,
signin::AccountConsistencyMethod account_consistency);
DiceResponseHandler* dice_response_handler);
~DiceTokenFetcher() override;
const std::string& gaia_id() const { return gaia_id_; }
......
......@@ -752,10 +752,9 @@ TEST_F(DiceResponseHandlerTest, FixAuthError) {
// Check that the token has not been inserted in the token service.
EXPECT_TRUE(token_service_.RefreshTokenIsAvailable(account_id));
EXPECT_TRUE(token_service_observer->token_received());
// Check that the reconcilor was not blocked or unblocked when fixing auth
// errors.
EXPECT_EQ(0, reconcilor_blocked_count_);
EXPECT_EQ(0, reconcilor_unblocked_count_);
// Check that the reconcilor was blocked and unblocked.
EXPECT_EQ(1, reconcilor_blocked_count_);
EXPECT_EQ(1, reconcilor_unblocked_count_);
}
// Tests that the Dice Signout response is ignored when kDiceFixAuthErrors is
......
......@@ -9,7 +9,6 @@
#include "base/callback.h"
#include "base/logging.h"
#include "chrome/common/webui_url_constants.h"
#include "components/signin/core/browser/profile_management_switches.h"
#include "components/signin/core/browser/signin_manager.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
......@@ -28,26 +27,28 @@ void RedirectToNtp(content::WebContents* contents) {
ProcessDiceHeaderDelegateImpl::ProcessDiceHeaderDelegateImpl(
content::WebContents* web_contents,
PrefService* user_prefs,
signin::AccountConsistencyMethod account_consistency,
SigninManager* signin_manager,
bool is_sync_signin_tab,
EnableSyncCallback enable_sync_callback,
ShowSigninErrorCallback show_signin_error_callback)
: content::WebContentsObserver(web_contents),
user_prefs_(user_prefs),
account_consistency_(account_consistency),
signin_manager_(signin_manager),
enable_sync_callback_(std::move(enable_sync_callback)),
show_signin_error_callback_(std::move(show_signin_error_callback)),
is_sync_signin_tab_(is_sync_signin_tab) {
DCHECK(web_contents);
DCHECK(user_prefs_);
DCHECK(signin_manager_);
}
ProcessDiceHeaderDelegateImpl::~ProcessDiceHeaderDelegateImpl() = default;
bool ProcessDiceHeaderDelegateImpl::ShouldEnableSync() {
if (!signin::IsDicePrepareMigrationEnabled()) {
if (!signin::DiceMethodGreaterOrEqual(
account_consistency_,
signin::AccountConsistencyMethod::kDicePrepareMigration)) {
// Dice prepare migration not enabled.
VLOG(1) << "Do not start sync after web sign-in [DICE prepare migration "
"not enabled].";
return false;
......@@ -89,7 +90,8 @@ void ProcessDiceHeaderDelegateImpl::HandleTokenExchangeFailure(
const GoogleServiceAuthError& error) {
DCHECK_NE(GoogleServiceAuthError::NONE, error.state());
bool should_enable_sync = ShouldEnableSync();
if (!should_enable_sync && !signin::IsDiceEnabledForProfile(user_prefs_))
if (!should_enable_sync &&
account_consistency_ != signin::AccountConsistencyMethod::kDice)
return;
content::WebContents* web_contents = this->web_contents();
......
......@@ -12,13 +12,13 @@
#include "base/callback_forward.h"
#include "base/macros.h"
#include "components/signin/core/browser/profile_management_switches.h"
#include "content/public/browser/web_contents_observer.h"
namespace content {
class WebContents;
}
class PrefService;
class SigninManager;
class ProcessDiceHeaderDelegateImpl : public ProcessDiceHeaderDelegate,
......@@ -39,7 +39,7 @@ class ProcessDiceHeaderDelegateImpl : public ProcessDiceHeaderDelegate,
// tab.
ProcessDiceHeaderDelegateImpl(
content::WebContents* web_contents,
PrefService* user_prefs,
signin::AccountConsistencyMethod account_consistency,
SigninManager* signin_manager,
bool is_sync_signin_tab,
EnableSyncCallback enable_sync_callback,
......@@ -55,7 +55,7 @@ class ProcessDiceHeaderDelegateImpl : public ProcessDiceHeaderDelegate,
// Returns true if sync should be enabled after the user signs in.
bool ShouldEnableSync();
PrefService* user_prefs_;
signin::AccountConsistencyMethod account_consistency_;
SigninManager* signin_manager_;
EnableSyncCallback enable_sync_callback_;
ShowSigninErrorCallback show_signin_error_callback_;
......
......@@ -16,7 +16,6 @@
#include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
#include "components/signin/core/browser/fake_signin_manager.h"
#include "components/signin/core/browser/profile_management_switches.h"
#include "components/signin/core/browser/scoped_account_consistency.h"
#include "components/signin/core/browser/test_signin_client.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "content/public/browser/web_contents.h"
......@@ -61,9 +60,11 @@ class ProcessDiceHeaderDelegateImplTest
// Creates a ProcessDiceHeaderDelegateImpl instance.
std::unique_ptr<ProcessDiceHeaderDelegateImpl> CreateDelegate(
bool is_sync_signin_tab) {
bool is_sync_signin_tab,
signin::AccountConsistencyMethod account_consistency) {
return std::make_unique<ProcessDiceHeaderDelegateImpl>(
web_contents(), &pref_service_, &signin_manager_, is_sync_signin_tab,
web_contents(), account_consistency, &signin_manager_,
is_sync_signin_tab,
base::BindOnce(&ProcessDiceHeaderDelegateImplTest::StartSyncCallback,
base::Unretained(this)),
base::BindOnce(
......@@ -105,12 +106,11 @@ class ProcessDiceHeaderDelegateImplTest
// Check that sync is enabled if the tab is closed during signin.
TEST_F(ProcessDiceHeaderDelegateImplTest, CloseTabWhileStartingSync) {
// Setup the test.
signin::ScopedAccountConsistencyDice account_consistency;
GURL kSigninURL = GURL("https://accounts.google.com");
NavigateAndCommit(kSigninURL);
ASSERT_EQ(kSigninURL, web_contents()->GetVisibleURL());
std::unique_ptr<ProcessDiceHeaderDelegateImpl> delegate =
CreateDelegate(true);
CreateDelegate(true, signin::AccountConsistencyMethod::kDice);
// Close the tab.
DeleteContents();
......@@ -125,12 +125,11 @@ TEST_F(ProcessDiceHeaderDelegateImplTest, CloseTabWhileStartingSync) {
// received.
TEST_F(ProcessDiceHeaderDelegateImplTest, CloseTabWhileFailingSignin) {
// Setup the test.
signin::ScopedAccountConsistencyDice account_consistency;
GURL kSigninURL = GURL("https://accounts.google.com");
NavigateAndCommit(kSigninURL);
ASSERT_EQ(kSigninURL, web_contents()->GetVisibleURL());
std::unique_ptr<ProcessDiceHeaderDelegateImpl> delegate =
CreateDelegate(true);
CreateDelegate(true, signin::AccountConsistencyMethod::kDice);
// Close the tab.
DeleteContents();
......@@ -178,15 +177,13 @@ class ProcessDiceHeaderDelegateImplTestEnableSync
// Test the EnableSync() method in all configurations.
TEST_P(ProcessDiceHeaderDelegateImplTestEnableSync, EnableSync) {
// Setup the test.
signin::ScopedAccountConsistency account_consistency(
GetParam().account_consistency);
GURL kSigninURL = GURL("https://accounts.google.com");
NavigateAndCommit(kSigninURL);
ASSERT_EQ(kSigninURL, web_contents()->GetVisibleURL());
if (GetParam().signed_in)
signin_manager_.SignIn("gaia_id", "user", "pass");
std::unique_ptr<ProcessDiceHeaderDelegateImpl> delegate =
CreateDelegate(GetParam().signin_tab);
CreateDelegate(GetParam().signin_tab, GetParam().account_consistency);
// Check expectations.
delegate->EnableSync(account_id_);
......@@ -228,15 +225,13 @@ class ProcessDiceHeaderDelegateImplTestHandleTokenExchangeFailure
TEST_P(ProcessDiceHeaderDelegateImplTestHandleTokenExchangeFailure,
HandleTokenExchangeFailure) {
// Setup the test.
signin::ScopedAccountConsistency account_consistency(
GetParam().account_consistency);
GURL kSigninURL = GURL("https://accounts.google.com");
NavigateAndCommit(kSigninURL);
ASSERT_EQ(kSigninURL, web_contents()->GetVisibleURL());
if (GetParam().signed_in)
signin_manager_.SignIn("gaia_id", "user", "pass");
std::unique_ptr<ProcessDiceHeaderDelegateImpl> delegate =
CreateDelegate(GetParam().signin_tab);
CreateDelegate(GetParam().signin_tab, GetParam().account_consistency);
// Check expectations.
delegate->HandleTokenExchangeFailure(email_, auth_error_);
......
......@@ -15,6 +15,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/signin_error_controller_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
......@@ -275,7 +276,9 @@ GURL GetReauthURLWithEmailForDialog(signin_metrics::AccessPoint access_point,
}
GURL GetSigninURLForDice(Profile* profile, const std::string& email) {
DCHECK(signin::IsDicePrepareMigrationEnabled());
DCHECK(signin::DiceMethodGreaterOrEqual(
AccountConsistencyModeManager::GetMethodForProfile(profile),
signin::AccountConsistencyMethod::kDicePrepareMigration));
GURL url = GaiaUrls::GetInstance()->signin_chrome_sync_dice();
if (!email.empty())
url = net::AppendQueryParameter(url, "email_hint", email);
......
......@@ -7,6 +7,7 @@
#include <utility>
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/signin/dice_tab_helper.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_promo.h"
......@@ -66,12 +67,14 @@ void SigninViewController::ShowSignin(
#if defined(OS_CHROMEOS)
ShowModalSigninDialog(mode, browser, access_point);
#else // defined(OS_CHROMEOS)
if (signin::IsDicePrepareMigrationEnabled()) {
Profile* profile = browser->profile();
if (signin::DiceMethodGreaterOrEqual(
AccountConsistencyModeManager::GetMethodForProfile(profile),
signin::AccountConsistencyMethod::kDicePrepareMigration)) {
std::string email;
if (GetSigninReasonFromMode(mode) ==
signin_metrics::Reason::REASON_REAUTHENTICATION) {
SigninManagerBase* manager =
SigninManagerFactory::GetForProfile(browser->profile());
SigninManagerBase* manager = SigninManagerFactory::GetForProfile(profile);
email = manager->GetAuthenticatedAccountInfo().email;
}
ShowDiceSigninTab(mode, browser, access_point,
......
......@@ -99,10 +99,10 @@
#include "chromeos/chromeos_switches.h"
#include "components/arc/arc_util.h"
#else // !defined(OS_CHROMEOS)
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/ui/webui/settings/settings_default_browser_handler.h"
#include "chrome/browser/ui/webui/settings/settings_manage_profile_handler.h"
#include "chrome/browser/ui/webui/settings/system_handler.h"
#include "components/signin/core/browser/profile_management_switches.h"
#endif // defined(OS_CHROMEOS)
#if defined(USE_NSS_CERTS)
......@@ -315,8 +315,9 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui)
profile->GetPrefs()));
}
#else // !defined(OS_CHROMEOS)
html_source->AddBoolean("diceEnabled",
signin::IsDiceEnabledForProfile(profile->GetPrefs()));
html_source->AddBoolean(
"diceEnabled",
AccountConsistencyModeManager::IsDiceEnabledForProfile(profile));
#endif // defined(OS_CHROMEOS)
html_source->AddBoolean("unifiedConsentEnabled",
......
......@@ -7,6 +7,7 @@
#include <memory>
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/ui/webui/welcome_handler.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/browser_resources.h"
......@@ -14,7 +15,6 @@
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
#include "components/signin/core/browser/profile_management_switches.h"
#include "content/public/browser/web_ui_data_source.h"
#include "net/base/url_util.h"
#include "ui/base/l10n/l10n_util.h"
......@@ -47,7 +47,8 @@ WelcomeUI::WelcomeUI(content::WebUI* web_ui, const GURL& url)
content::WebUIDataSource* html_source =
content::WebUIDataSource::Create(url.host());
bool is_dice = signin::IsDiceEnabledForProfile(profile->GetPrefs());
bool is_dice =
AccountConsistencyModeManager::IsDiceEnabledForProfile(profile);
// There are multiple possible configurations that affects the layout, but
// first add resources that are shared across all layouts.
......
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