0
Commit Graph

1299 Commits

Author SHA1 Message Date
Kaylee Lubick
4b79d0656e Remove SK_IGNORE_BLURRED_RRECT_OPT flag
In https://codereview.chromium.org/48623006/ Skia added an optimization
for blurring rounded rectangles (treating them as a ninepatch to
do less blurring and make the results cacheable). This saw up to an
80% reduction in time for rendering with the CPU backend in Skia's
benchmarks. However, due to differences in rendering between this
fast path and the existing path, it was not landed in Chromium and sat
unused here for 11+ years. It's been used in Android and all other
clients since then.

I addressed those rendering diffs [1][2][3] and this CL makes Chromium
use that fast path. This required setting up Chromium's discardable
memory cache (which Skia uses to cache masks and other things) because
in the new code path, Skia caches those blurred masks to save time
if there are, for example, multiple blurry rrects being drawn with 5px
border and the same sigma values.

There are still some very minor differences in appearance between the
two implementations, which I've addressed by rebasing and adding some
slight fuzzy tolerances, to make the tests less brittle for future
blur changes.

[1] http://review.skia.org/953496
[2] http://review.skia.org/953516
[3] https://crrev.com/c/6328778

Change-Id: I140844d24a9e31cb2bde4e25b6cb1cce1b812f67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6335820
Commit-Queue: Kaylee Lubick <kjlubick@chromium.org>
Reviewed-by: Benoit Lize <lizeb@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Ashley Prasad <ashleydp@google.com>
Cr-Commit-Position: refs/heads/main@{#1432101}
2025-03-13 07:41:12 -07:00
Kenichi Ishibashi
6d04d7320e Revert "[views-ax] Create BrowserViewsAXManager instance in the correct place"
This reverts commit db6d48dfdd.

Reason for revert: Caused Linux UBSan test failure, e.g. https://chromium-swarm.appspot.com/task?id=6fa5b90aa914e711&o=true&w=true

Original change's description:
> [views-ax] Create BrowserViewsAXManager instance in the correct place
>
> Previously, I introduced BrowserViewsAXManager (behind a flag) and
> instantiated it from the ViewsDelegate constructor. This was incorrect,
> as we rely on the AXPlatform::GetInstance that only gets created a few
> moments later in the BrowserMainLoop. The design was invalid.
>
> The challenge here is that we must initialize the BrowserViewsAXManager
> class, which lives in the ui/views layer, from the browser_main_loop.
> Because content/browser cannot depend directly on ui/views, we must
> instead leverage the ChromeBrowserMainExtraPartViews to initialize the
> shared instance and store it.
>
> Bug: 40672441
> Change-Id: I62432f9e547172bbe357040db29428e41db7d82c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6293824
> Reviewed-by: Robert Liao <robliao@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Auto-Submit: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1431815}

Bug: 40672441
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I178c4f10b9e31c62cef3ec606ceca6f8d15a8dc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6349100
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Owners-Override: Kenichi Ishibashi <bashi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1431927}
2025-03-12 22:14:34 -07:00
Benjamin Beaudry
db6d48dfdd [views-ax] Create BrowserViewsAXManager instance in the correct place
Previously, I introduced BrowserViewsAXManager (behind a flag) and
instantiated it from the ViewsDelegate constructor. This was incorrect,
as we rely on the AXPlatform::GetInstance that only gets created a few
moments later in the BrowserMainLoop. The design was invalid.

The challenge here is that we must initialize the BrowserViewsAXManager
class, which lives in the ui/views layer, from the browser_main_loop.
Because content/browser cannot depend directly on ui/views, we must
instead leverage the ChromeBrowserMainExtraPartViews to initialize the
shared instance and store it.

Bug: 40672441
Change-Id: I62432f9e547172bbe357040db29428e41db7d82c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6293824
Reviewed-by: Robert Liao <robliao@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Auto-Submit: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1431815}
2025-03-12 16:19:56 -07:00
Emily Andrews
2677e32f02 Move Service Process Host files to a separate folder
This change moves service process host code into its own service_host
folder.

This change should modify no functionality.

Bug: 41493609
Change-Id: I5b760717dc42340921bf7d6699c147baa2772cf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089368
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Emily Andrews <emiled@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1424005}
2025-02-24 10:37:05 -08:00
Dave Tapuska
520b5c0134 [ios blink] Skip mojo sync call restrictions
iOS browser uses sync calls for in process unzipping. This
is disallowed in general but we allow it for the prototype.

Bug: 40254930
Change-Id: I405f5faa154af25163557e2afba74940f1c1fbad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282367
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422220}
2025-02-19 14:56:14 -08:00
Etienne Pierre-doray
9676d60389 [tracing] Move AddMetadataGeneratorFunction to BackgroundTracingManager initialization
This ensures the data sources are registered before any scenario starts.

Change-Id: I022038324fbb2f84bfb34b62317c6d2a64a3007e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6185484
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1409068}
2025-01-21 08:44:25 -08:00
Gabriel Charette
436bb8084c Cleanup AboveNormalCompositingBrowserWin
There is a remaining use case of `pump_type_hint` in
platform_thread_android.cc and it will therefore not be
cleaned up in this pass.

R=etiennep@chromium.org

Fixed: 40226692, 362246655
Change-Id: I706c7c1726d50c5cb170af3b2aba05e0b32daa4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6139009
Owners-Override: Etienne Pierre-Doray <etiennep@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401807}
2025-01-03 07:00:53 -08:00
Georg Neis
35ff854b7e Remove Lacros leftovers from content/browser, part 2
Main changes:
- Replace IS_CHROMEOS_ASH with the equivalent IS_CHROMEOS
- Remove obsolete build flag includes/dependencies

Bug: b:354842935
AX-Relnotes: n/a.
Change-Id: I079b003a4664a7a3f7281905323611b6fc4fe3da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6090635
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397108}
2024-12-16 18:02:08 -08:00
Etienne Pierre-doray
eac083a7b6 Add missing include in content/browser/browser_main_loop.cc
This is blocking https://chromium-review.googlesource.com/c/chromium/src/+/6072371

Change-Id: Ib4a8357064f9a1eb48ba1f07c7aae4db66702cea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6080154
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1394478}
2024-12-10 20:00:32 +00:00
Fredrik Hernqvist
43570cfa5c Delete UserInputMonitor
UserInputMonitor collects keypress data, which was previously used for
transient suppression in the WebRTC audio processor.
Transient suppression has been removed [1], so we no longer need
UserInputMonitor (and it contributes to unnecessary wakeups).

[1]: https://webrtc-review.googlesource.com/c/src/+/362840


Bug: 377854424
Change-Id: I47ea0e51c64d77a573647be9e2507fbe476203c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5999576
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
Cr-Commit-Position: refs/heads/main@{#1383479}
2024-11-15 08:38:53 +00:00
Peter Boström
fc7ddc185b Migrate to NOTREACHED() in content/
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().

This CL does not attempt to do additional rewrites of any surrounding
code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

This does clean up kCrashOnDanglingBrowserContext as both paths of the
kill switch are currently fatal. This has been rolled out for a long
time.

Bug: 40580068, 40062641
Change-Id: Ib88e710d003e2e48df3fc502ca54d2341d157a0e
Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5974816
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1376522}
2024-10-31 19:37:21 +00:00
Kalvin Lee
8529bddee4 PA: Remove no-op free() feature scaffolding
This CL is intended to be a no-op, as this feature was already launched
in efdfb40bf1.

This CL

*   removes the `base::Feature` controlling no-op `free()`,

*   strips all `MakeFreeNoOp()` calls save (the launched) one,

*   moves the TODO onto the DPD feature, and

*   moves `MakeFreeNoOp()` into `partition_alloc_support`.

Fixed: 40802063
Change-Id: I1d5e4f1c31287a3eb109961f92d348377f2fa75e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5937487
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Kalvin Lee <kdlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1373881}
2024-10-25 14:10:42 +00:00
Colin Blundell
d00da9cd65 [//content] Rename variable in browser_main_loop.cc
Opportunistic cleanup: `established_gpu_channel` is a misleading name
for this variable as it gets passed to a function wherein `true` means
that the function *should establish* the GPU channel. Rename the
variable and clarify the one place where it currently is used in a
way that checks the variable to determine whether the GPU process was
already launched.

Change-Id: I946c9b950e6a76afa10530fb2919c5cc468ff3aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5938090
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1371212}
2024-10-21 07:19:20 +00:00
Helmut Januschka
bcf73217bf Shift PowerMonitor to non static
Bug: 346931324
Change-Id: I80fab35a422083c5a9db1d9ee4a2ccd34e11d32f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5806403
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1350494}
2024-09-03 23:49:18 +00:00
Etienne Pierre-doray
8439625b8b [task] Merge kCompositing into kDisplayCritical
This is a no-op on most platforms because kDisplayCritical and kCompositing are equivalent already, as desired after progress
on crbug.com/1329208

On Linux and Fuchsia: kDisplayCritical is not equivalent to kCompositing, so this CL introduces change in behavior.

On Linux, this CL aligns behavior to ChromeOS (ChromeOS is already
running kCompositing threads with the same priority as kDisplayCritical).
Population is generally too small to draw reliable conclusion from
an experiment, so it's more robust to align with ChromeOS.
On Fuchsia, we simply drop kCompositing.
Effectively, this CL brings all kCompositing threads (each process' main thread, compositor thread and IO thread) to a higher priority than it was before.

Bug: 1329208
Change-Id: I6331a3eacb2396117e20d833eb993a91eadd1d47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4842549
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1344860}
2024-08-21 16:42:37 +00:00
Michael Thiessen
dd70b61356 Add end-to-end metric for mojo IPC latency
Records a subsampled metric for the time taken from when the sender
calls a mojo interface function to when the receiver's implementation
is called.

Metric is split by receiving thread for some important threads.

Bug: 356125152
Change-Id: I92154779b075d7815403a91919c2cee31ee67aae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5784162
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1343233}
2024-08-17 18:25:25 +00:00
Dominik Röttsches
5c10f5f9bb Clarify FontUniqueNameLookup is Android only
Rename file to contain Android suffix, add static_assert to fail
compilation on other platforms, add comment for firmware font
directories.

Preparation for upcoming CL to remove FreeType dependency from font
scanning. In the review of that change [1], danakj@ requested to perform
renames in order to ensure safety of memory-mapping font files.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/5677302

Bug: chromium:350770664
Change-Id: I65585fd0d2371cff3ce6612b93c1975d4f774f8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5757547
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1337780}
2024-08-06 11:21:58 +00:00
Tom Sepez
442e88ed51 Fix some unsafe_buffer_usage in content/browser.
Simple conversion to range-based for-loops avoids unsafe indexing
warnings.

-- Invert some tests and early return in HandleViewSource().

Change-Id: I349a7ddce84e132cb7ccc23c7db09e16f2fc3b7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5753065
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1336153}
2024-08-01 18:38:16 +00:00
Dave Tapuska
ade379332f Reland "[stack_sampling] Support unwinding on a worker thread"
This is a reland of commit b919f5e3b4

Patch set 1 is as landed. Patch set 2 contains the deps fix that
was causing a failure on mac arm64.

Original change's description:
> [stack_sampling] Support unwinding on a worker thread
>
> In order to facilitate unwinding off the sampling thread create
> an object that contains all the unwinding data.
>
> https://docs.google.com/document/d/1iRj_uNpJbg9dhQbibHFBE4nx8G7TNbwmhNOM2fEazI0/edit#heading=h.7nki9mck5t64
>
> Low-Coverage-Reason: HARD_TO_TEST iOS thread profiling is only enabled for canary and dev channels, not unknown channels.
> Bug: 40191622
> Change-Id: I00887cac1bccca93c0f9091061a872593069f7ce
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5598380
> Reviewed-by: Mike Wittman <wittman@chromium.org>
> Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1326888}

Bug: 40191622
Change-Id: I878be0f536b7e5791b6a78a56af846ad3074226d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5704241
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Mike Wittman <wittman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1327743}
2024-07-15 20:09:50 +00:00
Paul Adedeji
b96e76b799 Revert "[stack_sampling] Support unwinding on a worker thread"
This reverts commit b919f5e3b4.

Reason for revert: causing failing builders - more info at b:352776349

Original change's description:
> [stack_sampling] Support unwinding on a worker thread
>
> In order to facilitate unwinding off the sampling thread create
> an object that contains all the unwinding data.
>
> https://docs.google.com/document/d/1iRj_uNpJbg9dhQbibHFBE4nx8G7TNbwmhNOM2fEazI0/edit#heading=h.7nki9mck5t64
>
> Low-Coverage-Reason: HARD_TO_TEST iOS thread profiling is only enabled for canary and dev channels, not unknown channels.
> Bug: 40191622
> Change-Id: I00887cac1bccca93c0f9091061a872593069f7ce
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5598380
> Reviewed-by: Mike Wittman <wittman@chromium.org>
> Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1326888}

Bug: 40191622
Change-Id: If0785c7572e8ce6330824e80fdf16dcc9de53714
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5704078
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Paul Adedeji <pauladedeji@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Paul Adedeji <pauladedeji@google.com>
Cr-Commit-Position: refs/heads/main@{#1326928}
2024-07-12 19:08:09 +00:00
Dave Tapuska
b919f5e3b4 [stack_sampling] Support unwinding on a worker thread
In order to facilitate unwinding off the sampling thread create
an object that contains all the unwinding data.

https://docs.google.com/document/d/1iRj_uNpJbg9dhQbibHFBE4nx8G7TNbwmhNOM2fEazI0/edit#heading=h.7nki9mck5t64

Low-Coverage-Reason: HARD_TO_TEST iOS thread profiling is only enabled for canary and dev channels, not unknown channels.
Bug: 40191622
Change-Id: I00887cac1bccca93c0f9091061a872593069f7ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5598380
Reviewed-by: Mike Wittman <wittman@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326888}
2024-07-12 18:04:51 +00:00
Tsuyoshi Horo
cebf8ed45e Add net log in NetworkChangeNotifierApple::OnNetworkConfigChange
This CL introduces a new net log event NETWORK_MAC_OS_CONFIG_CHANGED to
debug the behavior of IP address change notifications.

This CL also moves the net::NetLog::InitializeSourceIdPartition() call
point from BrowserProcessImpl::Init() to
BrowserMainLoop::PostCreateMainMessageLoop() right before creating
a NetworkChangeNotifier.

Bug: 350029234, 345256215
Change-Id: I133060302d00db012e56865aface188aa8c29980
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5681503
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1325195}
2024-07-09 23:17:20 +00:00
Palak Agarwal
69dc61b1d5 Mv monitoring of camera devices to VCS for Windows
Doc: go/win-mv-camera-enumeration

Bug: 349518976
Change-Id: Iac1e4e1008bf4e013481928c35fcea2b4b4eab52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5453866
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
Reviewed-by: Markus Handell <handellm@google.com>
Commit-Queue: Palak Agarwal <agpalak@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1319655}
2024-06-26 09:57:03 +00:00
Etienne Pierre-doray
f3fd9e8521 [tracing] Move trace_startup_config to services/tracing/
In follow up, trace_startup_config needs to depend on
services/tracing/public/cpp/perfetto/perfetto_config.h
https://chromium-review.googlesource.com/c/chromium/src/+/5581006

Change-Id: Ie45079bb868e945a562733b6d0445652ccc8362b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5622351
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1314065}
2024-06-12 16:40:35 +00:00
Nasko Oskov
ee48dfb4fa Prepare to remove //content/ from unsafe_bufers_paths.txt
Suppress unsafe buffer usage on a file-by-file basis.  Out of
approximately 5850 .cc and .h files only roughly 160 files fail
compilation with the unsafe buffers warning.

Suppress only, by inserting boilerplate into affected files. Do not
re-write any code to work around the issues. Properly fixing each file
will be done in follow-up CLs.

//content/ is not removed from unsafe_bufers_paths.txt file and will be
also done as a follow-up, so it makes potential reverts simpler.

Bug: 342213636
Change-Id: I4a936e63dea95a78951f7bfae6d5487708ae3c0b
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608913
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312393}
2024-06-08 05:13:06 +00:00
Will Harris
baafd89456 Move BrowserDynamicCodeDisabled feature from content to chrome
In a future CL, BrowserDynamicCodeDisabled will need to access
local_state in order for it to be dynamically controlled by policy.

This CL moves the existing feature out of content into chrome, where
it is initialized at PostEarlyInitialization. This is right after
local_state becomes available, but critically before the launcher
thread is created, which is important for the security mitigation
to work correctly.

This was manually tested with the feature enabled and disabled, and
inspecting the process attributes in "Process Hacker". In addition
it was tested that the mitigation is being applied early enough
by manually removing the code that marks the launcher thread as opted
out, and verifying that chrome cannot launch processes, as expected.

Further automated tests will be added when the enterprise policy
lands in a future CL, but this CL has no intended behavior change.

BUG=341991447,40234145

Change-Id: Ibe2c027a5a30873a9d402cbaf046b2522103eef2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5556567
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304215}
2024-05-22 02:50:40 +00:00
Peter Boström
8472105d01 Use NOTREACHED_IN_MIGRATION() in content/
This was generated by replacing "  NOTREACHED()" with
"  NOTREACHED_IN_MIGRATION()" and running git cl format.

This prepares for making NOTREACHED() [[noreturn]] alongside
NotReachedIsFatal migration of existing inventory.

Bug: 40580068
Change-Id: I3b48b89911ac5e9ffcb211622992f917f8f9e8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539619
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301096}
2024-05-15 04:36:02 +00:00
Alison Gale
81f4f2c793 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
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}
2024-04-22 19:33:31 +00:00
Alison Gale
53c77f6b62 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
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: Iabdfea2fd5393d6bbc54390ca0c995eb2c55bbaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5469882
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@{#1290673}
2024-04-22 15:16:27 +00:00
Alison Gale
47d1537de7 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
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: Ieeb461e2d489e86fd50b87a2a0721a2be34520c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5467317
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Darryl James <dljames@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Darryl James <dljames@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290198}
2024-04-19 21:31:46 +00:00
Takuto Ikuta
c8d6b16f02 format windows headers using new config.
Test new config:
https://chromium-review.googlesource.com/c/chromium/src/+/5197064

by applying clang-format on every problematic windows headers.

This CL is cloned from https://crrev.com/c/5366045.

Script:
-------

```
function replace {
    echo "Replacing $1 by $2"
    git grep -l "$1" \
        | cut -f1 -d: \
        | grep \
              -e "\.h" \
              -e "\.cc" \
        | grep -v "third_party/[^b]" \
        | sort \
        | uniq \
        | xargs sed -i "s/$1/$2/gi"
}

git checkout origin/main
git branch -D change-5197064 || true

git new-branch change-5197064
replace "#include <\(initguid|mmdeviceapi\|windows\|winsock2\|ws2tcpip\|shobjidl\|atlbase\|ole2\|unknwn\|objbase\|tchar\).h>" ""
replace "#include \"base\\/win\\/atl.h\"" ""
replace "#include <uiautomation.*>" ""
git add -u
git commit -m "remove problematic windows headers"
git revert HEAD --no-commit
git add -u
git commit -m "add problematic windows headers"
git cl format --upstream=HEAD~
git add -u
git commit -m "format"

git cl issue 5367127
git cl upload -df --bypass-hook
```

Also removed some unnecessary comments.

Bug: 329138753
Change-Id: I161c28ea2d27c569825e0c789a4c143530937f58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367127
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287420}
2024-04-15 16:59:19 +00:00
Palak Agarwal
f33fdfef2d Rm CameraMonitoringInVideoCaptureService feature as it's 100% launched
Bug: 1448798
Change-Id: I2e9ab5832725088c407c51af6ac06726a97513be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5444513
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Palak Agarwal <agpalak@chromium.org>
Reviewed-by: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/main@{#1287304}
2024-04-15 13:43:41 +00:00
Kurt Catti-Schmidt
8d751d7e49 [Text Contrast] Update LegacyDisplayGlobals to take all render params
This change updates SetCachedPixelGeometry to include additional
rendering parameters for text contrast and gamma. These new values
aren't in use yet but will be soon, see
https://chromium-review.googlesource.com/c/chromium/src/+/5283107

These values are behind a lock. Architecturally, these parameters
are subject to data races, and have been for some time. This is
not a major problem in practice. However, we don't want to introduce
the scenario where the parameters are out-of-sync with each other,
so this change gates them all behind a shared lock.

Bug: 1160653
Change-Id: Idb95f185cf5cfe9652906c5accccfe27053ead30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5336525
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Brendon Tiszka <tiszka@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1268008}
2024-03-04 19:42:15 +00:00
Tom Anderson
dfa5f0d9ad Set GPU subpixel rendering setting later in initialization
This change removes the last remaining usage of FontConfig early in
initialization (the next later one occurs after browser window
creation, during rendering).  This is enough for cost of FcInit()
(30ms-100ms) to be fully masked while it runs on a worker thread.

R=thestig,sky

Fixed: 1523810
Change-Id: I00e1a15efb2c7c6f344cfbd1f9ecf81d557981c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5263506
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1264719}
2024-02-23 20:29:06 +00:00
Ada Romanowski
1d27fd13cc Add features that will be used during Finch experimentation.
A feature for testing the optimal placement of the function which
inserts the no-op on free implementation of the allocator dispatch.
The parameters include insertion of the new layer before the
ShutdownThreads() function is called, when it is called, after
it is called, as well as a default disabled state.

Bug: 1266349
Change-Id: I0ada0d28b9ba408dda5715fc3646dc5eae517f5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5256537
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Takashi Sakamoto <tasak@google.com>
Commit-Queue: Ada Romanowski <adarom@google.com>
Cr-Commit-Position: refs/heads/main@{#1260896}
2024-02-15 05:00:30 +00:00
Jan Keitel
748d58e033 Allow registering multiple OnceClosures in RegisterOnNextIdleCallback.
Bug: 1475902
Change-Id: Ic351171b6ef00ae6f4094a47ee06c5012b7aa7d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5144688
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Jan Keitel <jkeitel@google.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1249558}
2024-01-19 21:55:38 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email&utm_source=footer

As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Neehit Goyal
157e58226b Removing unnecessary 'content::' from browser_main_loop.cc as its in content namespace.
Change-Id: Iafa5c0f70413297c484dc99318fd1da55795b3d1
Bug: 1506098
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5113729
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Shubham Gupta <shubham.gupta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1238404}
2023-12-16 10:38:48 +00:00
Palak Agarwal
f0416e2b4d Mv camera enumeration to video capture service
Doc: go/mv-camera-enumeration

We define a new class VideoCaptureDevicesChangedObserver that
establishes a mojo connection between the video capture service and
the browser process and receives OnDeviceChanged events from
video_capture::DevicesChangedNotifier.

These changes are exposed under the feature
'kCameraMonitoringInVideoCaptureService' which will gradually be
rolled out following the finch process.

Bug: 1448798
Change-Id: I60048b3a2cc8f7b844bc823002f12419dde79f4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5002121
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Palak Agarwal <agpalak@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1228892}
2023-11-24 21:33:54 +00:00
Chris Fredrickson
bd490b71bd [RWS] Move switch-parsing code to FPSParser; move LocalSetDecl to net/
This centralizes the parsing step with the rest of the parsing code;
and encodes the invariants that GlobalFirstPartySets expects the local
set declaration to satisfy, explicitly, by checking them directly in
the only nontrivial constructor of LocalSetDeclaration.

This makes the interface exposed by GlobalFirstPartySets safer, since
it is now impossible to call ApplyManuallySpecifiedSet with an invalid
map of entries.

It also makes it easier to evolve the internal representation of a
LocalSetDeclaration if needed, since they are now only constructed via
a default ctor or the FPSParser; and their internals are only accessed
by the GlobalFirstPartySets class.

Bug: 1503736
Change-Id: I92eb5c778b0a7aad778aff04a7b92744cdc415a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5042729
Reviewed-by: Shuran Huang <shuuran@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1227538}
2023-11-21 19:42:15 +00:00
Shuran Huang
0e53c7fb18 [RWS] Migrate switch kUseFirstPartySet to kUseRelatedWebsiteSet
Both switches are supported during the transition period. If both
switches are provided, `kUseRelatedWebsiteSet` takes precedence.

Bug: 1486689
Change-Id: I1da10051abddb693b4f4a4460ded57586123bfa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4897501
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Shuran Huang <shuuran@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1204675}
2023-10-03 15:36:59 +00:00
Etienne Pierre-doray
72caf35a3d [tracing] Implement FieldTracing feature
To provide a server side background tracing proto config.
Drive by: initializes Chrome background tracing in
ChromeBackgroundTracingMetricsProvider to align with webview.

Bug: 1418116
Change-Id: I09a8e4254bd2da65b9aad70a83328721af3bd2b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4858916
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1202278}
2023-09-28 04:05:06 +00:00
Etienne Pierre-doray
7e530d0893 [tracing] Move BackgroundTracingManager::CreateInstance() before PreCreateThreads
This is necessary in https://chromium-review.googlesource.com/c/chromium/src/+/4873565
to make BackgroundTracingManager available in
BackgroundTracingMetricsProvider and to address this todo:
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/tracing/chrome_background_tracing_metrics_provider.cc;l=37?q=chrome%2Fbrowser%2Ftracing%2Fchrome_background_tracing_metrics_provider.cc&ss=chromium

Change-Id: If1fc39987a0761c37164a744bfc0d75084e16da8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4879803
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1200359}
2023-09-22 18:20:49 +00:00
Arthur Sonzogni
bdeca8e234 Privatize content features.
There are two headers to declare features in content.
- the public one: `content/public/common/content_features.h`
- the private one: `content/common/features.h`.

Unfortunately, most are declared in the public one, despite being used
privately exclusively. This violate the `content/public/` rules. This
patches provides a fix.

Parts of this patch was made programmatically using this script:
https://paste.googleplex.com/6699322946093056, with the following
output: https://paste.googleplex.com/5591288895242240

This patch:
1. Update `docs/how_to_add_your_feature_flag.md` to incentive
   developers to the non public versions.
2. Move ~70 features back into the private version.
3. Programmatically update the includes to include the correct
   #include header(s).
4. For consistency and minimizing the amount of files modified,
   the two headers to use the `features::` namespace.

AX-Relnotes: n/a.
Change-Id: Id9126a95dfbc533d4778b188b659b5acc9b3d9e3
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4836057
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194718}
2023-09-11 08:32:12 +00:00
Greg Thompson
d97b838504 [accessibility] BrowserMainLoop owns BrowserAccessibilityStateImpl
Make the process-wide BrowserAccessibilityStateImpl a member of
BrowserMainLoop rather than a self-contained singleton that outlives the
browser process. This provides deterministic construction and makes it
easier to allow the content embedder to customize the instance.

For the sake of tests:
- content::UnitTestTestSuite owns an instance for use by unit tests.
- content::TestContentClientInitializer owns an instance for use by unit
  tests that run outside of an ordinary content unit test.

Bug: 1470199
AX-Relnotes: n/a.
Change-Id: I33b8606f2113ce6a4cc4f24f4fce1131b84f956d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4742506
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Reviewed-by: Jacques Newman <janewman@microsoft.com>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1186389}
2023-08-22 10:18:39 +00:00
Avi Drissman
eac566b060 Move foundation_util to base/apple, leave a forwarding header
Crashpad is not yet updated for the new location, so leave a
forwarding header to be removed later.

Skipping trybots. This is a Mac change, and it’s passing all
trybots except for android_optional_gpu_tests_rel that is
repeatedly failing on an unrelated issue.

NOTRY=true

Bug: 1444927
Cq-Include-Trybots: luci.chrome.try:mac-chrome
Change-Id: Iad0c903187b0e1e5584c68f2eb00b5b026085596
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4790744
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1185029}
2023-08-18 02:56:21 +00:00
Avi Drissman
5289ab2545 Move scoped_nsautorelease_pool to base/apple, leave a forwarding header
Crashpad is not yet updated for the new location, so leave a
forwarding header to be removed later.

Bug: 1444927
Change-Id: I143ff8d594afde9c9f5079c477f38d87337e2092
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4784010
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1184446}
2023-08-16 23:13:22 +00:00
Austin Eng
fddc819963 Add metrics for WebGPU support
Metrics are reported during Dawn info collection.
Info collection occurs 120 seconds after browser startup.

Bug: 1457662
Change-Id: I8f9c288c34c735c85bbd0466fac0e510d14e93f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4662090
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Roger McFarlane <rogerm@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1168966}
2023-07-11 21:39:30 +00:00
Alex Attar
63ab3bd526 Add trace report database a local database for tracing.
This patch adds the ability to create and initialize the database and table, and implements methods to add/remove traces to it and update their upload state. It also hooks up database creation to BackgroundTracingManager.

Subsequent patches will add:

- The Ability to write traces into the trace report database from the BackgroundTracingManager.
- A UI to display the traces currently stored in the database.
- Manually upload and download the trace from the UI.

Change-Id: I3e4e3d060f7e8bf7d926faf32fa3b255f29beea2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4288767
Reviewed-by: Alexander Timin <altimin@chromium.org>
Auto-Submit: Alex Attar <aattar@google.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Alex Attar <aattar@google.com>
Cr-Commit-Position: refs/heads/main@{#1168883}
2023-07-11 19:31:44 +00:00
Etienne Pierre-doray
44477e15ca [tracing] Explicit initialization of BackgroundTracingManager
This achieves a few things:
- In unittests, BackgroundTracingManager is scoped, thus destroyed between each test. This is necessary for follow-up that adds trace
database and needs to be destroyed https://chromium-review.googlesource.com/c/chromium/src/+/4288767
- EmitNamedTrigger() is static and no-ops if BackgroundTracingManager's instance isn't created. This prevents BackgroundTracingManager
from being created in unrelated unittests.

Bug: 1418116
Change-Id: I6ee493e6071593371f8a6dc205ef89891b2ed8a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621967
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1165923}
2023-07-05 14:18:27 +00:00