58 lines
2.6 KiB
Diff
58 lines
2.6 KiB
Diff
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
|
|
index 4aeaaf7b665f3..02caf981232f8 100644
|
|
--- content/browser/storage_partition_impl.cc
|
|
+++ content/browser/storage_partition_impl.cc
|
|
@@ -489,10 +489,6 @@ class LoginHandlerDelegate {
|
|
}
|
|
|
|
WebContents* web_contents = web_contents_getter_.Run();
|
|
- if (!web_contents) {
|
|
- OnAuthCredentials(absl::nullopt);
|
|
- return;
|
|
- }
|
|
|
|
// WeakPtr is not strictly necessary here due to OnRequestCancelled.
|
|
creating_login_delegate_ = true;
|
|
@@ -544,12 +540,6 @@ void OnAuthRequiredContinuation(
|
|
mojo::PendingRemote<network::mojom::AuthChallengeResponder>
|
|
auth_challenge_responder,
|
|
base::RepeatingCallback<WebContents*(void)> web_contents_getter) {
|
|
- if (!web_contents_getter || !web_contents_getter.Run()) {
|
|
- mojo::Remote<network::mojom::AuthChallengeResponder>
|
|
- auth_challenge_responder_remote(std::move(auth_challenge_responder));
|
|
- auth_challenge_responder_remote->OnAuthCredentials(absl::nullopt);
|
|
- return;
|
|
- }
|
|
new LoginHandlerDelegate(
|
|
std::move(auth_challenge_responder), std::move(web_contents_getter),
|
|
auth_info, is_request_for_primary_main_frame, process_id, request_id, url,
|
|
@@ -2844,8 +2834,12 @@ void StoragePartitionImpl::GetQuotaSettings(
|
|
return;
|
|
}
|
|
|
|
+ // CEF always returns false for IsOffTheRecord(), so also check the path.
|
|
+ const bool is_incognito = browser_context_->IsOffTheRecord() ||
|
|
+ browser_context_->GetPath().empty();
|
|
+
|
|
storage::GetNominalDynamicSettings(
|
|
- GetPath(), browser_context_->IsOffTheRecord(),
|
|
+ GetPath(), is_incognito,
|
|
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
|
|
}
|
|
|
|
@@ -2855,9 +2849,12 @@ void StoragePartitionImpl::InitNetworkContext() {
|
|
cert_verifier::mojom::CertVerifierCreationParamsPtr
|
|
cert_verifier_creation_params =
|
|
cert_verifier::mojom::CertVerifierCreationParams::New();
|
|
- GetContentClient()->browser()->ConfigureNetworkContextParams(
|
|
+ if (!GetContentClient()->browser()->ConfigureNetworkContextParams(
|
|
browser_context_, is_in_memory(), relative_partition_path_,
|
|
- context_params.get(), cert_verifier_creation_params.get());
|
|
+ context_params.get(), cert_verifier_creation_params.get())) {
|
|
+ // Don't re-initialize the network context during shutdown.
|
|
+ return;
|
|
+ }
|
|
// Should be initialized with existing per-profile CORS access lists.
|
|
DCHECK(context_params->cors_origin_access_list.empty())
|
|
<< "NetworkContextParams::cors_origin_access_list should be populated "
|