chore: follow-up to roll 95.0.4612.5 (#30835)
* chore: enable v8 oilpan * chore: update patches * fix: network isolation key for preconnect requests * chore: update feat_expose_raw_response_headers_from_urlloader.patch
This commit is contained in:
parent
94ca57e296
commit
99c0a723fd
8 changed files with 315 additions and 20 deletions
|
@ -93,7 +93,6 @@ webview_fullscreen.patch
|
|||
disable_unload_metrics.patch
|
||||
fix_add_check_for_sandbox_then_result.patch
|
||||
extend_apply_webpreferences.patch
|
||||
fix_expose_decrementcapturercount_in_web_contents_impl.patch
|
||||
add_setter_for_browsermainloop_result_code.patch
|
||||
make_include_of_stack_trace_h_unconditional.patch
|
||||
build_libc_as_static_library.patch
|
||||
|
@ -108,3 +107,4 @@ feat_expose_raw_response_headers_from_urlloader.patch
|
|||
chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch
|
||||
fix_chrome_root_store_codegen_for_cross-compile_builds.patch
|
||||
process_singleton.patch
|
||||
fix_expose_decrementcapturercount_in_web_contents_impl.patch
|
||||
|
|
|
@ -16,6 +16,70 @@ This patch does the minimal approach to add back the raw response
|
|||
headers, moving forward we should find a way in upstream to provide
|
||||
access to these headers for loader clients created on the browser process.
|
||||
|
||||
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
|
||||
index 5fc02ead27db692a54a5b7efd7dd9cde3c8ee20a..0e42c2c51d6c599ccac560890c4499ba70216ffc 100644
|
||||
--- a/services/network/public/cpp/resource_request.cc
|
||||
+++ b/services/network/public/cpp/resource_request.cc
|
||||
@@ -227,6 +227,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
do_not_prompt_for_login == request.do_not_prompt_for_login &&
|
||||
is_main_frame == request.is_main_frame &&
|
||||
transition_type == request.transition_type &&
|
||||
+ report_raw_headers == request.report_raw_headers &&
|
||||
previews_state == request.previews_state &&
|
||||
upgrade_if_insecure == request.upgrade_if_insecure &&
|
||||
is_revalidating == request.is_revalidating &&
|
||||
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
|
||||
index 72bc778a6320dba7e453848ab95ddc6bf43181ba..3de6baf98396a2623ca8d5b74840c913d6f5c4b8 100644
|
||||
--- a/services/network/public/cpp/resource_request.h
|
||||
+++ b/services/network/public/cpp/resource_request.h
|
||||
@@ -150,6 +150,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
bool do_not_prompt_for_login = false;
|
||||
bool is_main_frame = false;
|
||||
int transition_type = 0;
|
||||
+ bool report_raw_headers = false;
|
||||
int previews_state = 0;
|
||||
bool upgrade_if_insecure = false;
|
||||
bool is_revalidating = false;
|
||||
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
index cc75591aa2955525e928f74941049cf6b0f47e17..4deae021c5f00ab018f440a1869db84f40b98579 100644
|
||||
--- a/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
@@ -188,6 +188,7 @@ bool StructTraits<
|
||||
out->do_not_prompt_for_login = data.do_not_prompt_for_login();
|
||||
out->is_main_frame = data.is_main_frame();
|
||||
out->transition_type = data.transition_type();
|
||||
+ out->report_raw_headers = data.report_raw_headers();
|
||||
out->previews_state = data.previews_state();
|
||||
out->upgrade_if_insecure = data.upgrade_if_insecure();
|
||||
out->is_revalidating = data.is_revalidating();
|
||||
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
|
||||
index 7390c691d2c7ffd8504aeb94ccb44a3c03c3c103..cda9b2f4ba3c7ed04ba23e46a2dfef8353dfb4a2 100644
|
||||
--- a/services/network/public/cpp/url_request_mojom_traits.h
|
||||
+++ b/services/network/public/cpp/url_request_mojom_traits.h
|
||||
@@ -253,6 +253,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
|
||||
static int32_t transition_type(const network::ResourceRequest& request) {
|
||||
return request.transition_type;
|
||||
}
|
||||
+ static bool report_raw_headers(const network::ResourceRequest& request) {
|
||||
+ return request.report_raw_headers;
|
||||
+ }
|
||||
static int32_t previews_state(const network::ResourceRequest& request) {
|
||||
return request.previews_state;
|
||||
}
|
||||
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
|
||||
index 4b0ba93acfb6aa61138469801547edebb1c8d91b..8996a1eaf64c2a96181450e486d785bc6b7edf3c 100644
|
||||
--- a/services/network/public/mojom/url_request.mojom
|
||||
+++ b/services/network/public/mojom/url_request.mojom
|
||||
@@ -303,6 +303,9 @@ struct URLRequest {
|
||||
// about this.
|
||||
int32 transition_type;
|
||||
|
||||
+ // Whether to provide unfiltered response headers.
|
||||
+ bool report_raw_headers;
|
||||
+
|
||||
// Whether or not to request a Preview version of the resource or let the
|
||||
// browser decide.
|
||||
// Note: this is an enum of type PreviewsState.
|
||||
diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom
|
||||
index cea1fb864ab46b4b0eabf1db11a0392d6cd575c1..df033f65d50b088778268827e506963afebe0a23 100644
|
||||
--- a/services/network/public/mojom/url_response_head.mojom
|
||||
|
@ -39,14 +103,31 @@ index cea1fb864ab46b4b0eabf1db11a0392d6cd575c1..df033f65d50b088778268827e506963a
|
|||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index c8e3249c79063c001028add6acd3a451074df214..5abf78a851c3a676315e683c7171badc4cb64505 100644
|
||||
index c8e3249c79063c001028add6acd3a451074df214..b6cb6ee4ae623e25abeec62b156002eb7b987028 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -1259,6 +1259,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -489,6 +489,7 @@ URLLoader::URLLoader(
|
||||
peer_closed_handle_watcher_(FROM_HERE,
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
base::SequencedTaskRunnerHandle::Get()),
|
||||
+ report_raw_headers_(request.report_raw_headers),
|
||||
devtools_request_id_(request.devtools_request_id),
|
||||
request_mode_(request.mode),
|
||||
request_credentials_mode_(request.credentials_mode),
|
||||
@@ -626,7 +627,7 @@ URLLoader::URLLoader(
|
||||
url_request_->SetRequestHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
|
||||
|
||||
- if (devtools_request_id()) {
|
||||
+ if (devtools_request_id() || report_raw_headers_) {
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1259,6 +1260,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
response_ = network::mojom::URLResponseHead::New();
|
||||
PopulateResourceResponse(url_request_.get(), is_load_timing_enabled_,
|
||||
options_, response_.get());
|
||||
+ if (raw_response_headers_ && devtools_request_id()) {
|
||||
+ if (raw_response_headers_ && report_raw_headers_) {
|
||||
+ std::vector<network::mojom::HttpRawHeaderPairPtr> header_array;
|
||||
+ size_t iterator = 0;
|
||||
+ std::string name, value;
|
||||
|
@ -62,3 +143,16 @@ index c8e3249c79063c001028add6acd3a451074df214..5abf78a851c3a676315e683c7171badc
|
|||
|
||||
// Parse and remove the Trust Tokens response headers, if any are expected,
|
||||
// potentially failing the request if an error occurs.
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index de2d9f23ad3907562445ba2d3c911f76f1376f5b..254e0ca7cca7332a15cedc324e41481e68831bbf 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -466,6 +466,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
|
||||
resource_scheduler_request_handle_;
|
||||
|
||||
+ // Whether client requested raw headers.
|
||||
+ bool report_raw_headers_ = false;
|
||||
bool enable_reporting_raw_headers_ = false;
|
||||
net::HttpRawRequestHeaders raw_request_headers_;
|
||||
scoped_refptr<const net::HttpResponseHeaders> raw_response_headers_;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Fri, 9 Apr 2021 19:30:01 +0200
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Fri, 3 Sep 2021 18:28:51 -0700
|
||||
Subject: fix: expose DecrementCapturerCount in web_contents_impl
|
||||
|
||||
This was made private in https://chromium-review.googlesource.com/c/chromium/src/+/2807829 but
|
||||
|
@ -8,23 +8,18 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
|
|||
to users. We should try to upstream this.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 4fa272275ba3883d105ddfd8deeb4987071d1b06..937980bdc07b7dbe007f6be550bc5eaf62295526 100644
|
||||
index 4fa272275ba3883d105ddfd8deeb4987071d1b06..7e7fb60540a113b8213a5a1b266b57f18d67b4a4 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1771,10 +1771,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
// outermost frame trees in this WebContents.
|
||||
std::vector<RenderFrameHostImpl*> GetOutermostMainFrames();
|
||||
@@ -1773,7 +1773,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
|
||||
+ public:
|
||||
// Called when the base::ScopedClosureRunner returned by
|
||||
// IncrementCapturerCount() is destructed.
|
||||
- void DecrementCapturerCount(bool stay_hidden, bool stay_awake);
|
||||
+ void DecrementCapturerCount(bool stay_hidden, bool stay_awake) override;
|
||||
|
||||
+ private:
|
||||
// Calculates the PageVisibilityState for |visibility|, taking the capturing
|
||||
// state into account.
|
||||
PageVisibilityState CalculatePageVisibilityState(Visibility visibility) const;
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 383d0fd95d7e807b83f4cd972c107fa27fefaac6..ae7a7f187b24bb3ec97bea37881f85ede8689936 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue