Commit d6e371de authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Signin][Android] Use ConsentLevel::kNotRequired for building consistency header

If kMobileIdentityConsistency is enabled - check unconsented primary
account while building X-Chrome-Connected header.

Bug: 1095128
Change-Id: Idc46c0352f5371bf3d92e9ec4a7e513f9c401b6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416352Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808291}
parent dfe95154
......@@ -4,6 +4,7 @@
#include "chrome/browser/signin/header_modification_delegate_impl.h"
#include "build/build_config.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/extensions/api/identity/web_auth_flow.h"
#include "chrome/browser/profiles/profile_io_data.h"
......@@ -65,12 +66,18 @@ void HeaderModificationDelegateImpl::ProcessRequest(
}
#endif
ConsentLevel consent_level = ConsentLevel::kSync;
#if defined(OS_ANDROID)
if (base::FeatureList::IsEnabled(kMobileIdentityConsistency))
consent_level = ConsentLevel::kNotRequired;
#endif
FixAccountConsistencyRequestHeader(
request_adapter, redirect_url, profile_->IsOffTheRecord(),
prefs->GetInteger(prefs::kIncognitoModeAvailability),
AccountConsistencyModeManager::GetMethodForProfile(profile_),
IdentityManagerFactory::GetForProfile(profile_)
->GetPrimaryAccountInfo()
->GetPrimaryAccountInfo(consent_level)
.gaia,
#if defined(OS_CHROMEOS)
is_secondary_account_addition_allowed,
......
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