Skip to content

Commit

Permalink
Real instance methods for BrowserContext: StoragePartition methods.
Browse files Browse the repository at this point in the history
This CL refactors non-overridable (i.e. implemented only within
//content) methods of `BrowserContext`, so that they are implemented as
instance methods (rather than as `static` methods taking a `self`
argument).  This particular CL refactors the following methods:
- GetStoragePartition
- GetStoragePartitionForUrl
- ForEachStoragePartition
- GetStoragePartitionCount
- AsyncObliterateStoragePartition
- GarbageCollectStoragePartitions
- GetDefaultStoragePartition

Using instance methods (e.g. modifying all the callsites to use
instance method invocation syntax) is a prerequisite for splitting
BrowserContext into BrowserContextImpl+BrowserContextDelegate.  In
particular, in the long-term, the refactored methods should be
pure-virtual methods of BrowserContext that are overriden/implemented by
BrowserContextImpl.  Such virtual methods would be *instance* methods -
this is what the current CL helps with.

Bug: 1179776
AX-Relnotes: n/a.
Change-Id: I6effd1da5c17f27579251d41051b6ea08f689faf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2725732
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Owners-Override: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#877482}
  • Loading branch information
anforowicz authored and Chromium LUCI CQ committed Apr 29, 2021
1 parent 7d387a1 commit b9a969a
Show file tree
Hide file tree
Showing 455 changed files with 1,371 additions and 1,525 deletions.
2 changes: 1 addition & 1 deletion android_webview/browser/aw_quota_manager_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ StoragePartition* AwQuotaManagerBridge::GetStoragePartition() const {

// AndroidWebview does not use per-site storage partitions.
StoragePartition* storage_partition =
content::BrowserContext::GetDefaultStoragePartition(browser_context_);
browser_context_->GetDefaultStoragePartition();
DCHECK(storage_partition);
return storage_partition;
}
Expand Down
2 changes: 1 addition & 1 deletion android_webview/browser/aw_settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void AwSettings::UpdateRendererPreferencesLocked(
AwBrowserContext::FromWebContents(web_contents());
// AndroidWebview does not use per-site storage partitions.
content::StoragePartition* storage_partition =
content::BrowserContext::GetDefaultStoragePartition(aw_browser_context);
aw_browser_context->GetDefaultStoragePartition();
std::string expanded_language_list =
net::HttpUtil::ExpandLanguageList(prefs->accept_languages);
storage_partition->GetNetworkContext()->SetAcceptLanguage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AwSafeBrowsingBlockingPage::AwSafeBrowsingBlockingPage(
AwBrowserContext* aw_browser_context =
AwBrowserContext::FromWebContents(web_contents);
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
content::BrowserContext::GetDefaultStoragePartition(aw_browser_context)
aw_browser_context->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess();
// TODO(timvolodine): create a proper history service; currently the
// HistoryServiceFactory lives in the chrome/ layer and relies on Profile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ OnboardingFetcherFactory::GetForBrowserContext(
KeyedService* OnboardingFetcherFactory::BuildServiceInstanceFor(
content::BrowserContext* browser_context) const {
return new autofill_assistant::AutofillAssistantOnboardingFetcher(
content::BrowserContext::GetDefaultStoragePartition(browser_context)
browser_context->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess());
}
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void ContextualSearchSceneLayer::FetchThumbnail(
GURL gurl(thumbnail_url_);
Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile);
network::mojom::URLLoaderFactory* loader_factory =
content::BrowserContext::GetDefaultStoragePartition(profile)
profile->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess()
.get();
fetcher_ =
Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/android/cookies/cookies_fetcher_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ namespace {
network::mojom::CookieManager* GetCookieServiceClient() {
// Since restoring Incognito CCT session from cookies is not supported, it is
// safe to use the primary OTR profile here.
return content::BrowserContext::GetDefaultStoragePartition(
ProfileManager::GetPrimaryUserProfile()->GetPrimaryOTRProfile(
/*create_if_needed=*/true))
return ProfileManager::GetPrimaryUserProfile()
->GetPrimaryOTRProfile(/*create_if_needed=*/true)
->GetDefaultStoragePartition()
->GetCookieManagerForBrowserProcess();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ void DetachedResourceRequest::Start(
std::unique_ptr<DetachedResourceRequest> request,
content::BrowserContext* browser_context) {
request->start_time_ = base::TimeTicks::Now();
auto* storage_partition =
content::BrowserContext::GetStoragePartition(browser_context, nullptr);
auto* storage_partition = browser_context->GetStoragePartition(nullptr);

request->url_loader_->SetOnRedirectCallback(
base::BindRepeating(&DetachedResourceRequest::OnRedirectCallback,
Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/android/customtabs/origin_verifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ OriginVerifier::OriginVerifier(JNIEnv* env,
jobject_.Reset(obj);
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
DCHECK(profile);
url_loader_factory_ =
content::BrowserContext::GetDefaultStoragePartition(profile)
->GetURLLoaderFactoryForBrowserProcess();
url_loader_factory_ = profile->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess();
web_contents_ = content::WebContents::FromJavaWebContents(jweb_contents);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void JNI_ExploreSitesBridgeExperimental_GetIcon(
Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile);
GURL icon_url(ConvertJavaStringToUTF8(env, j_url));
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
content::BrowserContext::GetDefaultStoragePartition(profile)
profile->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess();
image_fetcher::ImageFetcherParams params(kTrafficAnnotation,
kImageFetcherUmaClientName);
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/android/explore_sites/ntp_json_fetcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void NTPJsonFetcher::Start(Callback callback) {
simple_loader_ = network::SimpleURLLoader::Create(std::move(resource_request),
traffic_annotation);
network::mojom::URLLoaderFactory* loader_factory =
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
browser_context_->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess()
.get();
simple_loader_->SetRetryOptions(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/android/feed/v2/feed_service_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ KeyedService* FeedServiceFactory::BuildServiceInstanceFor(
Profile* profile = Profile::FromBrowserContext(context);

content::StoragePartition* storage_partition =
content::BrowserContext::GetDefaultStoragePartition(context);
context->GetDefaultStoragePartition();

signin::IdentityManager* identity_manager =
IdentityManagerFactory::GetForProfile(profile);
Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/android/feedback/connectivity_checker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ ConnectivityChecker::ConnectivityChecker(
const GURL& url,
const base::TimeDelta& timeout,
const base::android::JavaRef<jobject>& java_callback)
: shared_url_loader_factory_(
content::BrowserContext::GetDefaultStoragePartition(profile)
->GetURLLoaderFactoryForBrowserProcess()),
: shared_url_loader_factory_(profile->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess()),
url_(url),
timeout_(timeout),
java_callback_(java_callback),
Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/android/rlz/rlz_ping_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ namespace android {
RlzPingHandler::RlzPingHandler(const JavaRef<jobject>& jprofile) {
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
DCHECK(profile);
url_loader_factory_ =
content::BrowserContext::GetDefaultStoragePartition(profile)
->GetURLLoaderFactoryForBrowserProcess();
url_loader_factory_ = profile->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess();
}

RlzPingHandler::~RlzPingHandler() = default;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/android/signin/signin_manager_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void SigninManagerAndroid::FetchPolicyBeforeSignIn(
base::OnceCallback<void()> policy_callback,
const ManagementCredentials& credentials) {
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
content::BrowserContext::GetDefaultStoragePartition(profile_)
profile_->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess();
user_policy_signin_service_->FetchPolicyForSignedInUser(
AccountIdFromAccountInfo(account), credentials.dm_token,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ TEST_F(SigninManagerAndroidTest, DISABLED_DeleteGoogleServiceWorkerCaches) {
// be able to observe deletions.
// Add service workers.
auto helper = base::MakeRefCounted<browsing_data::CannedCacheStorageHelper>(
content::BrowserContext::GetDefaultStoragePartition(profile()));
profile()->GetDefaultStoragePartition());

for (const TestCase& test_case : kTestCases)
helper->Add(url::Origin::Create(GURL(test_case.worker_url)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ std::vector<blink::NotificationResources> ParseResources(
}

PlatformNotificationContext* GetContext(Profile* profile, const GURL& origin) {
auto* partition = BrowserContext::GetStoragePartitionForUrl(profile, origin);
auto* partition = profile->GetStoragePartitionForUrl(origin);
auto* context = partition->GetPlatformNotificationContext();
DCHECK(context);
return context;
Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/android/usage_stats/usage_stats_database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ UsageStatsDatabase::UsageStatsDatabase(Profile* profile)
suspension_db_initialized_(false),
token_mapping_db_initialized_(false) {
ProtoDatabaseProvider* db_provider =
content::BrowserContext::GetDefaultStoragePartition(profile)
->GetProtoDatabaseProvider();
profile->GetDefaultStoragePartition()->GetProtoDatabaseProvider();

base::FilePath usage_stats_dir = profile->GetPath().Append(kNamespace);

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/android/vr/vr_shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ void VrShell::SetVoiceSearchActive(bool active) {
std::string profile_locale = g_browser_process->GetApplicationLocale();
speech_recognizer_.reset(new SpeechRecognizer(
this, ui_,
content::BrowserContext::GetDefaultStoragePartition(profile)
profile->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcessIOThread(),
profile->GetPrefs()->GetString(language::prefs::kAcceptLanguages),
profile_locale));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ IN_PROC_BROWSER_TEST_F(WebApkIconHasherBrowserTest,

{
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
content::BrowserContext::GetDefaultStoragePartition(
web_contents->GetBrowserContext())
web_contents->GetBrowserContext()
->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess();

base::RunLoop run_loop;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/android/webapk/webapk_installer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ void WebApkInstaller::OnURLLoaderComplete(

network::SharedURLLoaderFactory* GetURLLoaderFactory(
content::BrowserContext* browser_context) {
return content::BrowserContext::GetDefaultStoragePartition(browser_context)
return browser_context->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess()
.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void WebApkUpdateDataFetcher::OnDidGetInstallableData(
Profile::FromBrowserContext(web_contents()->GetBrowserContext());

WebApkIconHasher::DownloadAndComputeMurmur2Hash(
content::BrowserContext::GetDefaultStoragePartition(profile)
profile->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess()
.get(),
url::Origin::Create(last_fetched_url_), urls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ SyncFileSystemDeleteFileSystemFunction::Run() {
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url));

scoped_refptr<storage::FileSystemContext> file_system_context =
BrowserContext::GetStoragePartition(
browser_context(), render_frame_host()->GetSiteInstance())
browser_context()
->GetStoragePartition(render_frame_host()->GetSiteInstance())
->GetFileSystemContext();
storage::FileSystemURL file_system_url(
file_system_context->CrackURL(GURL(url)));
Expand Down Expand Up @@ -162,8 +162,8 @@ SyncFileSystemRequestFileSystemFunction::Run() {
storage::FileSystemContext*
SyncFileSystemRequestFileSystemFunction::GetFileSystemContext() {
DCHECK(render_frame_host());
return BrowserContext::GetStoragePartition(
browser_context(), render_frame_host()->GetSiteInstance())
return browser_context()
->GetStoragePartition(render_frame_host()->GetSiteInstance())
->GetFileSystemContext();
}

Expand Down Expand Up @@ -199,8 +199,8 @@ ExtensionFunction::ResponseAction SyncFileSystemGetFileStatusFunction::Run() {
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url));

scoped_refptr<storage::FileSystemContext> file_system_context =
BrowserContext::GetStoragePartition(
browser_context(), render_frame_host()->GetSiteInstance())
browser_context()
->GetStoragePartition(render_frame_host()->GetSiteInstance())
->GetFileSystemContext();
storage::FileSystemURL file_system_url(
file_system_context->CrackURL(GURL(url)));
Expand Down Expand Up @@ -242,8 +242,8 @@ ExtensionFunction::ResponseAction SyncFileSystemGetFileStatusesFunction::Run() {
EXTENSION_FUNCTION_VALIDATE(args_->GetList(0, &file_entry_urls));

scoped_refptr<storage::FileSystemContext> file_system_context =
BrowserContext::GetStoragePartition(
browser_context(), render_frame_host()->GetSiteInstance())
browser_context()
->GetStoragePartition(render_frame_host()->GetSiteInstance())
->GetFileSystemContext();

// Map each file path->SyncFileStatus in the callback map.
Expand Down Expand Up @@ -322,15 +322,15 @@ SyncFileSystemGetUsageAndQuotaFunction::Run() {
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url));

scoped_refptr<storage::FileSystemContext> file_system_context =
BrowserContext::GetStoragePartition(
browser_context(), render_frame_host()->GetSiteInstance())
browser_context()
->GetStoragePartition(render_frame_host()->GetSiteInstance())
->GetFileSystemContext();
storage::FileSystemURL file_system_url(
file_system_context->CrackURL(GURL(url)));

scoped_refptr<storage::QuotaManager> quota_manager =
BrowserContext::GetStoragePartition(
browser_context(), render_frame_host()->GetSiteInstance())
browser_context()
->GetStoragePartition(render_frame_host()->GetSiteInstance())
->GetQuotaManager();

content::GetIOThreadTaskRunner({})->PostTask(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/accessibility/dictation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bool Dictation::OnToggleDictation() {
} else {
speech_recognizer_ = std::make_unique<NetworkSpeechRecognizer>(
weak_ptr_factory_.GetWeakPtr(),
content::BrowserContext::GetDefaultStoragePartition(profile_)
profile_->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcessIOThread(),
profile_->GetPrefs()->GetString(language::prefs::kAcceptLanguages),
language);
Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/ash/arc/auth/arc_auth_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,8 @@ ArcAuthService::ArcAuthService(content::BrowserContext* browser_context,
: profile_(Profile::FromBrowserContext(browser_context)),
identity_manager_(IdentityManagerFactory::GetForProfile(profile_)),
arc_bridge_service_(arc_bridge_service),
url_loader_factory_(
content::BrowserContext::GetDefaultStoragePartition(profile_)
->GetURLLoaderFactoryForBrowserProcess()) {
url_loader_factory_(profile_->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess()) {
arc_bridge_service_->auth()->SetHost(this);
arc_bridge_service_->auth()->AddObserver(this);

Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/ash/arc/fileapi/arc_file_system_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ scoped_refptr<storage::FileSystemContext> GetFileSystemContext(
content::BrowserContext* context,
const GURL& url) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::StoragePartition* storage =
content::BrowserContext::GetStoragePartitionForUrl(context, url);
content::StoragePartition* storage = context->GetStoragePartitionForUrl(url);
return storage->GetFileSystemContext();
}

Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/ash/login/existing_user_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ void TransferHttpAuthCaches() {
}

network::mojom::NetworkContext* default_network_context =
content::BrowserContext::GetDefaultStoragePartition(
ProfileHelper::GetSigninProfile())
ProfileHelper::GetSigninProfile()
->GetDefaultStoragePartition()
->GetNetworkContext();
default_network_context->SaveHttpAuthCacheProxyEntries(base::BindOnce(
&TransferHttpAuthCacheToSystemNetworkContext, completion_callback));
Expand Down
12 changes: 5 additions & 7 deletions chrome/browser/ash/login/profile_auth_data_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ CreateNetworkContextForDefaultStoragePartition(
auto network_context = std::make_unique<network::NetworkContext>(
network_service, network_context_remote.InitWithNewPipeAndPassReceiver(),
std::move(params));
content::BrowserContext::GetDefaultStoragePartition(browser_context)
->SetNetworkContextForTesting(std::move(network_context_remote));
browser_context->GetDefaultStoragePartition()->SetNetworkContextForTesting(
std::move(network_context_remote));
return network_context;
}

Expand Down Expand Up @@ -143,10 +143,8 @@ void ProfileAuthDataTest::Transfer(
bool transfer_auth_cookies_on_first_login,
bool transfer_saml_auth_cookies_on_subsequent_login) {
base::RunLoop run_loop;
ProfileAuthData::Transfer(content::BrowserContext::GetDefaultStoragePartition(
&login_browser_context_),
content::BrowserContext::GetDefaultStoragePartition(
&user_browser_context_),
ProfileAuthData::Transfer(login_browser_context_.GetDefaultStoragePartition(),
user_browser_context_.GetDefaultStoragePartition(),
transfer_auth_cookies_on_first_login,
transfer_saml_auth_cookies_on_subsequent_login,
run_loop.QuitClosure());
Expand Down Expand Up @@ -265,7 +263,7 @@ net::HttpAuthCache* ProfileAuthDataTest::GetAuthCache(

network::mojom::CookieManager* ProfileAuthDataTest::GetCookies(
content::BrowserContext* browser_context) {
return content::BrowserContext::GetDefaultStoragePartition(browser_context)
return browser_context->GetDefaultStoragePartition()
->GetCookieManagerForBrowserProcess();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ void InSessionPasswordSyncManager::CheckCredentials(
}

ProfileAuthData::Transfer(
signin_partition,
content::BrowserContext::GetDefaultStoragePartition(primary_profile_),
signin_partition, primary_profile_->GetDefaultStoragePartition(),
false /*transfer_auth_cookies_on_first_login*/,
transfer_saml_auth_cookies_on_subsequent_login,
base::BindOnce(&InSessionPasswordSyncManager::OnCookiesTransfered,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/login/saml/saml_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ void SAMLPolicyTest::GetCookies() {
user_manager::UserManager::Get()->GetActiveUser());
ASSERT_TRUE(profile);
base::RunLoop run_loop;
content::BrowserContext::GetDefaultStoragePartition(profile)
profile->GetDefaultStoragePartition()
->GetCookieManagerForBrowserProcess()
->GetAllCookies(base::BindLambdaForTesting(
[&](const std::vector<net::CanonicalCookie>& cookies) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ std::unique_ptr<RecommendAppsFetcher> RecommendAppsFetcher::Create(
display_config.InitWithNewPipeAndPassReceiver());
return std::make_unique<RecommendAppsFetcherImpl>(
delegate, std::move(display_config),
content::BrowserContext::GetDefaultStoragePartition(
ProfileManager::GetActiveUserProfile())
ProfileManager::GetActiveUserProfile()
->GetDefaultStoragePartition()
->GetURLLoaderFactoryForBrowserProcess()
.get());
}
Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/ash/login/session/user_session_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1492,8 +1492,7 @@ void UserSessionManager::UserProfileInitialized(Profile* profile,
// sign in using GAIA (webview) and webview didn't yet initialize.
if (signin_partition) {
ProfileAuthData::Transfer(
signin_partition,
content::BrowserContext::GetDefaultStoragePartition(profile),
signin_partition, profile->GetDefaultStoragePartition(),
transfer_auth_cookies_on_first_login,
transfer_saml_auth_cookies_on_subsequent_login,
base::BindOnce(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/login/signin/oauth2_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ class CookieReader {

void ReadCookies(Profile* profile) {
base::RunLoop run_loop;
content::BrowserContext::GetDefaultStoragePartition(profile)
profile->GetDefaultStoragePartition()
->GetCookieManagerForBrowserProcess()
->GetAllCookies(base::BindOnce(&CookieReader::OnGotAllCookies,
base::Unretained(this),
Expand Down
Loading

0 comments on commit b9a969a

Please sign in to comment.