The following is done:
- Make WebAudioDevice a pure virtual interface base class
- Move initialization code out of
RendererBlinkPlatformImpl::CreateAudioDevice() and into
RendererWebAudioDeviceImpl::Create()
These changes will make RendererWebAudioDeviceImpl easier to
understand and work with.
This should cause no functional change.
Change-Id: Ia2885f56711037e7e63e06e0617eccab02936ef4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5507060
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Wilson <mjwilson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1295423}
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:
- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)
Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.
#crbug-todo-migration
Bug: b/321899722
Change-Id: Ibc66b8c440e4bcdef414e77fef4d9874d2ea9951
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5493800
Auto-Submit: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293330}
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:
- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)
Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.
#crbug-todo-migration
Bug: b/321899722
Change-Id: Ib028de8bb63c99e5a81d90e24e422cf88061ad05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5469583
Owners-Override: Alison Gale <agale@chromium.org>
Reviewed-by: Darryl James <dljames@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290952}
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:
- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)
Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.
#crbug-todo-migration
Bug: b/321899722
Change-Id: Iee14d10d544e9f0ec046117cc4ec8a55c427adc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5469947
Reviewed-by: Darryl James <dljames@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290838}
blink::WebURLRequest is used for the argument of
URLLoaderThrottleProvider::CreateThrottles() method after [1]. But we
are planing to call this method from the background thread where we
don't use blink::WebURLRequest [2]. Also we are planing to deprecate
blink::WebURLRequest, and planing to use network::ResourceRequest
instead [3].
So this CL changes the argument type of CreateThrottles() from
blink::WebURLRequest to network::ResourceRequest.
A network::ResourceRequest is created in ResourceLoader::Start(). So we
pass the reference of the structure through ResourceFetcher::
CreateURLLoader().
In frames:
ResourceLoader::Start()
-> ResourceFetcher::CreateURLLoader()
-> LoaderFactoryForFrame::CreateURLLoader()
|-> URLLoaderThrottleProvider::CreateThrottles()
|-> ServiceWorkerNetworkProviderForFrame::
| GetSubresourceLoaderFactory()
|-> URLLoaderFactory::CreateURLLoader()
In workers:
ResourceLoader::Start()
-> ResourceFetcher::CreateURLLoader()
-> LoaderFactoryForWorker::CreateURLLoader()
|-> WebWorkerFetchContext::CreateThrottles()
| -> WebServiceWorkerFetchContextImpl::CreateThrottles() or
| DedicatedOrSharedWorkerFetchContextImpl::CreateThrottles()
| -> URLLoaderThrottleProvider::CreateThrottles()
|-> URLLoaderFactory::CreateURLLoader()
mojom::blink::RequestContextType in blink::WebURLRequest is checked in
the code path. But this type member is not in network::ResourceRequest.
network::ResourceRequest has a network::mojom::RequestDestination
member. And some of these checks of mojom::blink::RequestContextType can
be safely converted to network::mojom::RequestDestination without any
behavior change. But the check in ResourceFetcher::CreateURLLoader()
needs the mojom::blink::RequestContextType. Also we need to pass
`service_worker_race_network_request_token` to
LoaderFactoryForWorker::CreateURLLoader(), and
`is_from_origin_dirty_style_sheet` flag to
ServiceWorkerNetworkProviderForFrame::GetSubresourceLoaderFactory().
So this CL adds these three arguments to CreateURLLoader() methods.
[1]: https://crrev.com/c/994152
[2]: https://crrev.com/c/5113665
[3]: https://groups.google.com/a/chromium.org/forum/#!topic/platform-architecture-dev/ntSzerId4gw
Bug: 1379780
Change-Id: I6e0a987d779b1fb428a4b27b813b3f53f2d1d781
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5121813
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: David Song <wintermelons@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245656}
When a main thread isolate is created ask the platform whether it should
start in the background state or not. Extension processes always start
in the background state to conserve memory.
Bug: 263412
Change-Id: Ieb7e2c8854dc0de63f580ea53f61bfa5cda72514
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5078440
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1233413}
Change attribution support to be web_contents specific to support the
disabled option for WebView. This change ensures that when attribution
reporting is disabled for WebView, no calls are made (previously the
initial calls to the attribution server were made, although the result
was not logged).
OBSOLETE_HISTOGRAM[Conversions.AttributionSupport]=Replaced by Conversions.AttributionOsLevelApiState and Conversions.AttributionBehavior
Fixed: 1492081
Test: AttributionReportingTest
Change-Id: I0a1aceca88805a8446691aee98e2e5b7716dadb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4966783
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Joanne de Abreu <jdeabreu@google.com>
Reviewed-by: Nan Lin <linnan@chromium.org>
Auto-Submit: Joanne de Abreu <jdeabreu@google.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217264}
Assigned temporal values to the 3Gb feature parameters.
The parameters will be updated after running its finch
experiment.
Also added base::SysInfo::IsAndroidXGbDevice() based
on ram_targeting and replaced
UserLevelMemoryPressureGenerator to use the methods.
Bug: 1393283
Change-Id: Iaeb74c3604cb07f94db02231b761fd95eca16db6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4875407
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Commit-Position: refs/heads/main@{#1208100}
Protocol Handler specifies that only URLs with HTTP/HTTPS schemes are
allowed to be registered as Protocol handlers. However non-web URLs like
chrome-extension:// and isolated-app:// should be an exception to this.
This CL creates a new ProtocolHandlerSecurityLevel kSameOrigin that
allows the registration of protocol handler URL of non-HTTP(S) scheme
(while still within the same origin as the requesting frame). Currently,
only "isolated-app" schemed URLs are granted this security level.
Bug: 1484037
Change-Id: I94f87b065f45c2d1a6dbeb5484e32c4f52f71761
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4872957
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Zelin Liu <zelin@chromium.org>
Reviewed-by: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1207201}
Thread priorities cannot be correctly changed in any sandboxed process,
but currently this operation is only proxied out of renderers. This
moves SetThreadType off of RenderMessageFilter and into a separate
content::mojom::ThreadTypeSwitcher mojo interface so this interface can
be reused for other sandboxed processes, not just renderers.
The new content::mojom::ThreadTypeSwitcher is bound by
ChildProcessHost::BindHostReceiver() like many other per-process
interfaces are. The browser-side implementation runs directly on the
IO thread since all it does it dispatch the work to another thread.
RendererThreadTypeHandler (which proxies calls to
PlatformThread::SetCurrentThreadType out of the renderer process)
is renamed to SandboxedProcessThreadTypeHandler and moved to
content/child.
Change-Id: Id59c4ad0d4db2321dad994c702f6f2527aff5310
Bug: 1317590
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4898004
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1205519}
ContextProviderCommandBuffer has a hidden requirement that it should be
destroyed on the same sequence that it's bound to due to non-thread-safe
mojo::AssociatedReceiver<mojom::CommandBufferClient> client_receiver_ in
CommandBufferProxyImpl. This is true with or without locking enabled.
Make ContextProviderCommandBuffer delete on its bound sequence. It's not
possible to use RefCountedDeleteOnSequence for this since it requires
the task runner to be set at construction whereas we do it later via
BindToCurrentSequence.
Also includes minor cleanup in ContextProviderCommandBuffer sequence
checker, dchecks, etc. and makes it start from one ref count, fixing
call sites that use operator new instead of base::MakeRefCounted.
Bug: 1481757
Change-Id: I50c3fd5bab496ad54c1d850c71b70a52ace3b9aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4860505
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1196230}
In the past implementation, we used the cached value for the running
status when it is asked inside the ServiceWorkerSubresourceLoader.
It is a bit stale value and the caller may get too old value to use.
This CL makes the value updated on ServiceWorkerVersion's running status
change to avoid such mismatch as much as possible. For that purpose,
when the ServiceWorker static routing rules have rules with
running status condition, a mojo IPC receiver is created and passed
to the controller ServiceWorker connector to make the connector to be
the receiver of the running status.
We also fixed the test. The test expects the ServiceWorker has been
stopped. However, after `ReloadBlockUntilNavigationsComplete` is
called, the ServiceWorker awakes, and we need to explicitly stop it
to make the test work.
Bug: 1371756
Change-Id: I9ed5a6530c4fe33789fe794019e63d25c600d4bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4853777
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1195735}
UserLevelMemoryPressureSignalGenerator uses command-line and
the browser process provides its parameters for renderer processes,
but if the carveout of physical memory doesn't change, each
renderer process can look up the feature's parameter.
This change also fixes wrong component dependency.
Bug: 1393283
Change-Id: Ifcc531e1390818dbf08396bdb22a93b7f8d957dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4821106
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1192368}
This CL removes support User-Agent reduction origin trial for Javascript
API and all subresource requests. Make sure all context use the default
user-agent function instead of checking whether response has a valid
origin trial token on User-Agent reduction/deprecation origin trial.
This CL also refactor corresponding tests to make sure the user-agent
returns the correct value when reduction features turns on.
This CL cleans up other one-off code we introduced to completed the
user-agent reduction origin trial.
Change-Id: I3f1c3213feffc8f3fc7de8dc5c23b9090f498e3a
Bug: 1258063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4557684
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Victor Tan <victortan@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1155100}
Bunch of attributes are not used anymore:
* buffer_preserved is not read, nothing sets it to not default value
* single_buffer nothing sets it to not default value
* samples/sample_buffers/stencil_size/depth_size are default inited to
-1 and only overridden to 0. Command decoders check if they are > 0,
so that code is never reached.
* gpu::Capabilities::num_stencil_bits is not used.
* red/green/blue_bits are used only on android [1] and alpha_size is
set to only on android.
This CL removes unused attributes and code that sets it in the client.
Immediate affected code from GLES2 decoders is also removed, to make
this compile, but extensive cleanup will be done in follow-up.
Color attributes are not really needed on Android either, but it's not
trivial clean up, so for now put them under BUILDFLAG(IS_ANDROID).
[1] https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:gpu/ipc/service/gles2_command_buffer_stub.cc;l=140-144;drc=b8a0323a84f483b25e94b3a24d80fda16c5dd1ae;bpv=0;bpt=1
Bug: 1445523
Change-Id: Icc4d63922eff5b2b4702692316ac3ab3c21bd4aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582013
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1154072}
This is a refactoring CL that removes
`blink::mojom::ServiceWorkerFetchHandlerBypassOption
fetch_handler_bypass_option` from
CreateServiceWorkerSubresourceLoaderFactory. The param was introduced in
the previous CL [1], but it was unnecessary plumbing, we can pass
`mojom::blink::ServiceWorkerFetchHandlerBypassOption::kDefault` directly
to ControllerServiceWorkerConnector in
RendererBlinkPlatformImpl::CreateServiceWorkerSubresourceLoaderFactory.
[1] crrev.com/c/4451966
Bug: 1420517
Change-Id: Ifd4d3867b2b0c7f0e00d27b342255287b0a1c017
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4573500
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152364}
The URL is just used for annotation purposes; there's no need to use
TopDocument() here, which is misleading in cross-process iframes, since
it returns the Document of the local root instead. Several other places
already pass the document URL instead of the "top" document URL, so this
brings <canvas> more in line with the other uses anyway.
Also rename the various parameters and places it's plumbed through to
remove "top" from the name.
Bug: 617677
Change-Id: I6e605f1fd16001a6cfdeda83cd80e514d1cbdc45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4545273
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146207}
https://github.com/WICG/attribution-reporting-api/pull/758
Web attribution is explicitly disabled for WebView. This CL extends
the OS support enum to allow web attribution to be independently
configurable, and the Attribution-Reporting-Support header will
indicate the support level accordingly.
If neither web nor os-level attribution is enabled, background
attributionsrc requests will not be made, and
the Attribuiton-Reporting-Eligible header will not be set on requests.
Note that this applies even when kAttributionReportingCrossAppWeb
feature is disabled to avoid bandwidth waste.
A virtual function is added to ContentBrowserClient to allow WebView
to disable web attribution. A follow-up CL will enable OS support and
disable web support on WebView.
Note that we cannot add web tests for the NoWebOrOsSupport DevTools
issue type as there is no way to override the OS support value there.
Side note: when both web and OS are supported, the header is updated
to "os, web" to align with the explainer.
Bug: 1432278
Change-Id: Id53852ed2891755ff05b74ea025ce40f44c08956
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4413547
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1134960}
This CL enables ServiceWorkerBypassFetchHandler with the
`all_with_race_network_request` option (aka BestEffortServiceWorker) via
OriginTrial token.
We add the new option named
`ServiceWorkerFetchHandlerBypassOption::kRaceNetworkRequest` to
ServiceWorkerFetchHandlerBypassOption mojom, so that we can pass the
info that the loader should trigger RaceNetworkRequest from browser
to renderer. Once ServiceWorkerMainResourceLoader confirmed there is a
valid OriginTrial token, set
`ServiceWorkerFetchHandlerBypassOption::kRaceNetworkRequest`. Then
ServiceWorkerSubresourceLoader which is on a renderer side lookup
fetch_handler_bypass_option and dispatch RaceNetworkRequest.
Change-Id: I6d22bbcaee96e80d0e93b4f665e3d326d0c1ac71
Bug: 1420517
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4451966
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1133597}
This is one of the first steps to move attribution reporting request
and response logic to network service. It also makes it easier to
enforce the properties that the header is set if and only if the
corresponding feature is enabled and when the
Attribution-Reporting-Eligible is also present.
The feature flag and the mojom type are moved to
//services/network/public to be used by //services/network, blink and
browser. We will investigate removing all knowledge of the OS support
value from the renderer in the future.
The OS support enum is added to the resource request types to be
populated to the network service layer.
We will likewise move setting the Attribution-Reporting-Eligible header
to the network service in a future CL.
Bug: 1375791, 1425083
Change-Id: I6d0dc6154230963b376477a74239115b64c6ffae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4426530
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Brendon Tiszka <tiszka@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1131961}
`base::GUID` has been renamed, and is set to be removed. This CL is
part of a batch of changes replacing all uses of `base::GUID`, with
`base::Uuid`, and its associated counterparts.
Additionally, deprecated functions in `base/uuid.h` are also also having
their uses removed wherever they occur.
Changes for path: /content/renderer
This CL was uploaded by git cl split.
R=danakj@chromium.org
Bug: 1428566
Change-Id: Id854dd7204a52886a953a97b855fd6ee8cee0290
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4430411
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: Claudio DeSouza <cdesouza@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1131206}
Add |inert_interval| finch parameter to the feature and modify the code
to see RAILMode changes on render processes. If the current RAIL mode is
loading or is just changed to be not loading, we will consider that the
render process is running OnLoad or DOMContentLoaded event handler. The
process requires memory to finish the event handlers. So wait inert
interval after loading is finished and dispatch memory pressure signals
if any requests are arrived during the inert interval.
Bug: 1393283
Change-Id: Id12458659437b9ba74b038f9c1847c7799982672
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4333318
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120355}
Currently ExtensionLocalizationPeer is used to replace localization
templates in CSS files with the appropriate localized strings for
extensions [1].
ExtensionLocalizationPeer was introduced 13 years ago [2], and it is
using a mechanism of blink::WebRequestPeer to intercept and replace the
content body.
This mechanism of blink::WebRequestPeer is used only by
ExtensionLocalizationPeer now. And we can replace the content body using
the more widely used mechanism of blink::URLLoaderThrottle.
This CL introduces a new blink::URLLoaderThrottle named
ExtensionLocalizationThrottle, and replaces ExtensionLocalizationPeer
with it. This CL also removes the WebResourceRequestSenderDelegate which
is used only for ExtensionLocalizationPeer.
[1] https://developer.chrome.com/docs/extensions/reference/i18n/
[2] https://codereview.chromium.org/570007
Bug: 1417066, 1413912
Change-Id: I19b97bd745875f24f943d7cd9f93171de8ef627d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4257812
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1109362}
This CL does the following:
1. Delete Platform::WrapURLLoaderFactory() method.
2. Make RenderThreadImpl::InitializeRenderer() call a new
blink::SetCorsExemptHeaderList() method which calls
blink::LoaderFactoryForFrame::SetCorsExemptHeaderList().
3. blink::LoaderFactoryForFrame::CreateURLLoader() and
PrefetchedSignedExchangeManager will create a WebURLLoaderFactory
using a new blink::LoaderFactoryForFrame::GetCorsExemptHeaderList()
method.
Bug: 1413912
Change-Id: I6a37e355ee5779878ad3b086b079a04e6f9ab64b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4236209
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1104452}
content::RenderFrameImpl::FrameURLLoaderFactory creates a WebURLLoader.
FrameURLLoaderFactory is a subcrass of blink::WebURLLoaderFactory.
It is created by RenderFrameImpl::CreateURLLoaderFactory() and passed to
blink::LoaderFactoryForFrame::CreateURLLoader().
blink::LoaderFactoryForFrame::CreateURLLoader()
->blink::LocalFrame::GetURLLoaderFactory()
->blink::LocalFrameClient::CreateURLLoaderFactory()
blink::LocalFrameClientImpl::CreateURLLoaderFactory()
->blink::WebLocalFrameClient::CreateURLLoaderFactory()
content::RenderFrameImpl::CreateURLLoaderFactory()
blink::LoaderFactoryForFrame::CreateURLLoader() is creating a
blink::WebURLLoader using the FrameURLLoaderFactory.
This CL changes blink::LoaderFactoryForFrame::CreateURLLoader() to get a
network::SharedURLLoaderFactory from the RenderFrameImpl. And creates a
blink::WebURLLoader using Platform::WrapURLLoaderFactory().
This CL also introduces CreateURLLoaderForTesting() method in
blink::LocalFrameClient and blink::WebLocalFrameClient which returns a
mocked WebURLLoader for testing inside Blink.
content::RenderViewTest::CreateFakeURLLoaderFactory() will set a fake
network::SharedURLLoaderFactory to RenderFrameImpl instead of setting a
fake WebURLLoaderFactory. So we will not need to create a WebURLLoader
in the content layer.
Low-Coverage-Reason: Refactoring
Bug: 1413912
Change-Id: I5683a12835d7651ddce65e2246edcb57e31658a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4234680
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103839}
Currently ServiceWorkerNetworkProviderForFrame::CreateURLLoader() in the
content layer is called to create a WebURLLoader from
blink::LoaderFactoryForFrame::CreateURLLoader().
We'd like to stop exposing blink::WebURLLoader to the content layer.
So this CL does the followings:
- Replace ServiceWorkerNetworkProviderForFrame::CreateURLLoader() with
GetSubresourceLoaderFactory() which returns a
network::SharedURLLoaderFactory.
- Make blink::LoaderFactoryForFrame::CreateURLLoader() call the new
method to get a network::SharedURLLoaderFactory, and create a
blink::WebURLLoaderFactory using Platform::WrapURLLoaderFactory().
- Introduce Platform::WrapURLLoaderFactory(
scoped_refptr<network::SharedURLLoaderFactory>).
This CL should not introduce any behavior change.
Bug: 1413912, 789857
Change-Id: I44343eaceda6d308924db5bc75de8385ec01c4c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4211117
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102996}