Update url_request_http_job.cc

This commit is contained in:
Alexander David Frick 2022-01-05 15:19:05 -06:00 committed by GitHub
parent 9e3ae94387
commit 86c569af6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
// Copyright (c) 2021 The Chromium Authors. All rights reserved.
// Copyright (c) 2022 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.
@ -241,7 +241,7 @@ URLRequestHttpJob::URLRequestHttpJob(
throttling_entry_ = manager->RegisterRequestUrl(request->url());
ResetTimer();
ComputeCookiePartitionKey();
cookie_partition_key_ = ComputeCookiePartitionKey();
}
URLRequestHttpJob::~URLRequestHttpJob() {
@ -300,7 +300,7 @@ void URLRequestHttpJob::Start() {
request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
referer_value);
}
}
}
if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
request_info_.extra_headers.SetHeaderIfMissing(
@ -1622,13 +1622,12 @@ void URLRequestHttpJob::NotifyURLRequestDestroyed() {
network_quality_estimator->NotifyURLRequestDestroyed(*request());
}
void URLRequestHttpJob::ComputeCookiePartitionKey() {
absl::optional<CookiePartitionKey>
URLRequestHttpJob::ComputeCookiePartitionKey() {
const CookieStore* cookie_store = request_->context()->cookie_store();
if (!cookie_store) {
cookie_partition_key_ = absl::nullopt;
return;
}
cookie_partition_key_ = CookieAccessDelegate::CreateCookiePartitionKey(
if (!cookie_store)
return absl::nullopt;
return CookieAccessDelegate::CreateCookiePartitionKey(
cookie_store->cookie_access_delegate(),
request_->isolation_info().network_isolation_key());
}