0
Commit Graph

1659 Commits

Author SHA1 Message Date
Slobodan Pejic
8ef56c7056 Exclude ios/chrome/common from systemImageNamed presubmit.
* Add ios/chrome/common where code is prevented from including the
  symbol_helper.h since ios/chrome/common/DEPS does not allow depending
  on ios/chrome/browser/... where symbol_helpers.h is located.
* Update the path to symbol_helpers.h in the presubmit message.

Bug: 339887700, b/338625793
Change-Id: I84a79bd830944ae07a6c22ad406b7e5571292656
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5683109
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Slobodan Pejic <slobodan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326902}
2024-07-12 18:21:26 +00:00
mikt
6e9560c265 [PA/*Scan] Remove StarScan
No-Try because the timeout failure from linux-chromeos-rel is
caused by regression from `use_clang_coverage=true`.
Confirmed no failure in ash_unittests locally.
As it is not actionable from us, landing this change by skipping CQ.

Bug: 351126352
No-Try: true
Change-Id: I0b79a41a2ce68beb58ebc83c6e8b9a89ceb85891
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5678260
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Mikihito Matsuura <mikt@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Roger McFarlane <rogerm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326599}
2024-07-12 07:33:52 +00:00
danakj
91c715bb44 Spanify and bounds-check base::circular_deque
Add a range-based constructor, tagged with `base::from_range_t` as a
backport of the C++23 `std::from_range_t`.

Add a range-based assign, named assign_range(), matching std vector and
string in C++23.

Then mark the iterator-pair-based constructor and assign() as
UNSAFE_BUFFER_USAGE.

Change VectorBuffer (the internal class) to stop allowing dereference of
the pointer one past the allocation as this is UB, and CHECK for this
instead. Then stop using derefences in circular_deque that are used to
construct pointers (as we were doing this with the end pointer too and
thus CHECKing). Use pointer arithmetic instead which is valid to
construct the end pointer without invoking UB.

Write SAFETY comments and UNSAFE_BUFFERS() on the pointer arithmetic
inside circular_deque. Move to using spans of the VectorBuffer instead
in most cases.

Make the iterators check for moving out of bounds and dereferencing
end(). Stop going through a pointer to the deque to do iterator
operations to make things easier on the optimizer. However this means
we must reconstruct iterators internally when we change the begin_ or
end_ of the circular_deque, so some minor reordering was needed
internally. This doesn't affect external users as their iterators
would be considered invalidated when begin_ or end_ move anyways.

The binary size regressions are entirely due to the PGO profile being
incorrect after this change: https://crbug.com/344608183#comment7

Bug: 40284755
Fuchsia-Binary-Size: Regression is a temporary PGO artifact
Binary-Size: Regression is a temporary PGO artifact
Change-Id: I20e74d02901387d75aa611ea1e7e98a699a6265a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5655271
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1325442}
2024-07-10 13:24:26 +00:00
Daniel Cheng
8971922e9c Allow most of <ranges> but explicitly ban views
Change-Id: I67befc6d5cc18ab3ce43e6e3a1ad68f8dba878fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5668999
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1323174}
2024-07-04 04:59:29 +00:00
Mohannad Farrag
ed2a5b4134 Remove generate_javadoc
Cronet generates its own javadoc internally in google3 through a
different set of scripts, generating through google3 provides two better
functionality over doing it in Chromium:

1. APIs in google3 are ensured to have been well-tested after a series
of rollouts.
2. The current setup in Chromium is brittle as it requires to have
source files for all of the API, if some auto-generated file is
introduced through srcjar, it blows up.

Change-Id: I54e317e9f0672b88d22ad29526634ee17be9f7e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5667544
Reviewed-by: Chidera Olibie <colibie@google.com>
Commit-Queue: Chidera Olibie <colibie@google.com>
Auto-Submit: Mohannad Farrag <aymanm@google.com>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Etienne Dechamps <edechamps@google.com>
Reviewed-by: Stefano Duo <stefanoduo@google.com>
Cr-Commit-Position: refs/heads/main@{#1322664}
2024-07-03 09:21:08 +00:00
Daniel Cheng
566634ff1d git cl format --python PRESUBMIT.py and PRESUBMIT_test.py
Skipping the presubmit, because ironically enough, PRESUBMIT.py and
PRESUBMIT_test.py trigger a number of pre-existing presubmit violations.

No-Presubmit: true
Change-Id: I9aabeb8496a0582d6cb92af90db4ef3b32f70b04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5668998
Reviewed-by: Steinar H Gunderson <sesse@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1321358}
2024-06-29 14:56:53 +00:00
Andrey Kosyakov
fea0ef943e Do not crash while wrapping DOMArrayBuffer with no backing store
Bug: 345684057, 349015781
Change-Id: I9dfa4bcfc517eadaac6bdc357ed7936822954f3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5662176
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320419}
2024-06-27 16:10:41 +00:00
Scott Lee
bf6a094494 Disable DEPS review enforcement for cross-repo DEPS
When a new DEP is added, the presubmit check enforces reviews from
the owner of the additional DEP. However, when the DEP is from another
repo, the enforcement becomes trickier especially it is from a different
host.

This patch disables the check if a newly added DEP is from a submodule.

Change-Id: Id7c2feac005c1c769313dedb254d5a0b641ff68b
Bug: 324496840
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5656359
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320079}
2024-06-26 22:59:39 +00:00
Weizhong Xia
8b461f13b5 Do not check path length for baselines not used on Windows
This is one of the common reason that Wpt Importer will fail. Do not
check the length in this case so that a human intervention is less
likely needed.

Bug: None
Change-Id: Ida4e49f9892a8852e926b76bdda4755ab1865f98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5648314
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1318176}
2024-06-21 21:46:33 +00:00
Lei Zhang
1f9d9ec46b Tidy some rules in PRESUBMIT.py
- Add some separators to a few lists to improve readability.
- Do more sorting.

Change-Id: I40716aa6d42db12ab2fd8981b5b44104720183af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5644761
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1317524}
2024-06-20 18:42:27 +00:00
Ciara McMullin
28bce1a8a0 Implement config provider for android webview browser
The config provider is responsible for fetching tokens and proxy list on
demand for the network service. An instance will be initialized in AwBrowserContext::ConfigureNetworkParams and bound to the network service using Mojo interfaces. Majority of the logic and unittests come from the preexisting chrome/browser/ip_protection_config_provider*

Bug: b:335420700
Change-Id: Ic704fcdc1d966a1006a8787f1e117353e447fdff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5549298
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Dustin Mitchell <djmitche@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Ciara McMullin <ciaramcmullin@google.com>
Reviewed-by: Matthew Wang <matthewmwang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1315907}
2024-06-17 16:17:14 +00:00
Bartek Nowierski
49b1a4582d [BRP] Take a step towards enforcing raw_ptr/ref in Renderer code
We intend to exclude only a handful specific sub-directories (for perf
reasons). This CL removes the broad exclusions from the rewriter and
the enforcing clang plugin.

There is a risk that by the time the plugin rolls into Chromium,
someone will add a raw pointer, which will cause the plugin
to error out and block the roll-out. Therefore, add those broad
exclusions into BUILD.gn temporarily -- they'll be removed after
the plugin rolls, once we confirm that all pointers in those
directories are properly rewritten.

In other words, this CL doesn't change the clang plugin enforcement
behavior.

Bug: 40064499, 331846123
Change-Id: Ia95e8df846d167521a5ac43cc63e556002702ee9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5600329
Auto-Submit: Bartek Nowierski <bartekn@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Bartek Nowierski <bartekn@chromium.org>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312344}
2024-06-08 00:24:35 +00:00
Erik Chen
5416b3a65a Fix presubmit line wrap.
The explanation parameter is an iterable. The previous explanations were
written as ("explanation") which becomes a string iterable, one
character per line. This should instead be ("explanation",), which is a
one-tuple.

Change-Id: Ided5a74938300dd3eab73bdeec9eb5cc1e756459
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5605485
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312186}
2024-06-07 19:49:03 +00:00
Bartek Nowierski
f9f1b6635c [BRP] Semi-automated T* -> raw_ptr<T> Renderer rewrite 'refresh'
This time we're allowing pointers in third_party/blink/public/web/, but also covering new ones that popped up under /renderer/

No performance regression has been observed on benchmarks:
https://pinpoint-dot-chromeperf.appspot.com/job/12b5674f810000
https://pinpoint-dot-chromeperf.appspot.com/job/15e0c119810000
https://pinpoint-dot-chromeperf.appspot.com/job/11a435cd810000
https://pinpoint-dot-chromeperf.appspot.com/job/128306a7810000

Bug: 40064499, 331846123
Change-Id: I0d5cb5cae26a084ba4ca9195e432858059b09ffd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5602549
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Owners-Override: Keishi Hattori <keishi@chromium.org>
Auto-Submit: Bartek Nowierski <bartekn@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1311752}
2024-06-07 04:59:00 +00:00
Rasika Navarange
d977df34bc [Chrome Stdlib] Fix presubmit
A test data file was uploaded without adding a DEPS entry. The presubmit
was only showing a message rather than an error. This change adds the
missing DEPS entry and makes the presubmit message an error.

Change-Id: I0491104ddf9ab0c9a84de1a7542354c198ab36f3
Bug: 345023320
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5600600
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Owners-Override: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Rasika Navarange <rasikan@google.com>
Cr-Commit-Position: refs/heads/main@{#1310513}
2024-06-05 10:01:27 +00:00
Bret Sepulveda
0ca7bfbfb5 Revert "[PRESUBMIT] Check if files are written to a dep dir"
This reverts commit 367476a325.

Reason for revert: Causing presubmit bot failures. See b/345023320, or ask battre@ for more information.

Original change's description:
> [PRESUBMIT] Check if files are written to a dep dir
>
> No files should be written to a directory that's used by CIPD or GCS, as
> defined in DEPS. Git already doesn't allow files to be written to a
> directory that's a gitlink.
>
> Bug: 343199633
> Change-Id: Ica929b7c6e5ca84082f24343869014e9eccfde58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5578422
> Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1310264}

Bug: 343199633
Change-Id: Idab125b2a0e2a7c673927ba6be4627c7ecb3fbe6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5598862
Owners-Override: Bret Sepulveda <bsep@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1310492}
2024-06-05 08:50:42 +00:00
Josip Sokcevic
367476a325 [PRESUBMIT] Check if files are written to a dep dir
No files should be written to a directory that's used by CIPD or GCS, as
defined in DEPS. Git already doesn't allow files to be written to a
directory that's a gitlink.

Bug: 343199633
Change-Id: Ica929b7c6e5ca84082f24343869014e9eccfde58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5578422
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1310264}
2024-06-04 22:23:34 +00:00
Erik Chen
845b9e6f94 Disallow more browser finder methods.
Change-Id: Iaea200b15de0d635213d15e6ea4e1fffd2b5b6e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5595731
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1310226}
2024-06-04 21:40:48 +00:00
Victor Hugo Vianna Silva
e22929779c Fix formatting of deprecated sync functions warning
Details in the linked bug.

Fixed: 344785744
Change-Id: If415bda800502ff7b33f60f90efad6db6fb3d969
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5593874
Reviewed-by: Dominic Battre <battre@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/main@{#1310015}
2024-06-04 17:11:55 +00:00
Arthur Sonzogni
48702338e3 partition_alloc: Remove temporary exception for build_config.h
Re-enable chromium's PRESUBMIT ensuring no silent failure when using the
define from build_config.

Contrary to chromium, everything in "partition_alloc/build_config.h"
can exclusively be used through "PA_BUILDFLAG(...)". There are no
risk of silent failure. PartitionAlloc is not using chromium's defines.

TEST=git cl presubmit --files=base/allocator/partition_allocator/*

Bug: 41481467
Change-Id: I7f8d89d2e10646ae4b0b0c4526fd17beabad4ad9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5591680
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309880}
2024-06-04 12:32:12 +00:00
Rasika Navarange
277cd66085 [Chrome Stdlib]: Support renaming of test data objects
Allow files to be renamed while keeping the same sha256.

The previous version of the presubmit fails when we try to do this as it checks that when a file is removed, the matching hash is also removed from the DEPS file. In the case of renaming the hash stays the same and we want to explicitly allow this.

Change-Id: Iedb384858d45f078b04740b2937650061af1d861
Bug: 312895063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5575129
Commit-Queue: Rasika Navarange <rasikan@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309836}
2024-06-04 10:14:59 +00:00
Erik Chen
87358e8495 Add a presubmit warning against using BrowserUserData
BrowserWindowFeatures is functionally equivalent and does not force a
circular dependency.

Change-Id: Iff20797183d3ec38a93378eeed94e1e130589f9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5592269
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309742}
2024-06-04 02:13:12 +00:00
Erik Chen
f58f7206c3 Add presubmits warnings for commonly misused functions.
Change-Id: I0b9c673dfcb13e29d4a384c39e1721cdb7c2d231
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5591890
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309589}
2024-06-03 21:21:52 +00:00
Arthur Sonzogni
4fd14fd59c PRESUBMIT: Fix & improve CheckForInvalidIfDefinedMacros
1. Normalize path separator, so that the skipped path could be
   recognized on Windows.
2. Exclude //build/build_config.h because it is currently not passing
   the check.
3. Add exclusion for partition_alloc/build_config.h for the same reason.
   It will be useful to merge the follow-up:
   https://chromium-review.googlesource.com/c/chromium/src/+/5576943

Bug: 41481467
Change-Id: Id4b4cd42ac746c6eb74dd501f6177c331217a4c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5585036
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309100}
2024-06-02 18:42:52 +00:00
Rasika Navarange
08e542168e [Chrome Stdlib] Move .sha256 files to separate directory from test data
We need to move the .sha256 files to a separate directory to the actual
test data. This is because Cog does not support contents of a directory
coming from multiple sources i.e. both Git and GCS. So we need a
separate directory for files coming from GCS from the files coming from
Git.

Change-Id: I16fee14405a2b4faee842e01dd1e94ed2ccf0eec
Bug: 312895063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5582049
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Rasika Navarange <rasikan@google.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1308600}
2024-05-31 13:31:26 +00:00
Allen Bauer
5839eb218f Add PRESUBMIT warnings for WIDGET_OWNS_NATIVE_WIDGET and
NATIVE_WIDGET_OWNS_WIDGET

We are refactoring Views code with an eye towards changing the ownership model of widgets to CLIENT_OWNS_WIDGET as the only ownership model. This will warn developers when they are landing code using one of these two ownership models.


Change-Id: I77c8911d3ab5669fb6f148a650465c4f43e2d09b
Bug: 339619005
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5577858
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#1306988}
2024-05-28 20:20:06 +00:00
Lei Zhang
d84f951ae2 Make CheckForIncludeGuards() presubmit fire warning for incorrect #endif
Check headers to make sure the "#endif // GUARD" line matches the
"#if GUARD" line.

Change-Id: I9d11dc8cf42f4058bd3bb1cd9e27a3269251a301
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5577500
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306964}
2024-05-28 19:43:30 +00:00
Rasika Navarange
c2d33d2eab Reland "[Chrome Stdlib] Use DEPS to download diff test data"
This is a reland of commit 6c8f992499

This reland adds the deps entry for chrome_5672_histograms.pftrace.gz
which was missing in the original CL, causing b/342182426 which caused
the original CL to be reverted.

Original change's description:
> [Chrome Stdlib] Use DEPS to download diff test data
>
> We want to download Perfetto test data via GCS dependencies in DEPS
> rather than Perfetto's test_data script. To make this change we:
>
> 1. Modify the test_data.py script to wrap
>    `upload_to_google_storage_first_class.py` instead of Perfetto's
>    `test_data` script.
> 2. Add a Presubmit check to ensure the .sha256 files are in sync with
>    the deps entries.
> 3. Update docs to give instructions for the new workflow
>
> Change-Id: I20616c95553f93603e338dd9fa47e84facfb60d8
> Bug: 312895063
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545295
> Reviewed-by: Stephen Nusko <nuskos@chromium.org>
> Commit-Queue: Rasika Navarange <rasikan@google.com>
> Reviewed-by: Dominic Battre <battre@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304407}

Bug: 312895063
Change-Id: I6bcd74324612e5c49ae59bee3f0b20f673d70b81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5562906
Reviewed-by: Dominic Battre <battre@chromium.org>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: Rasika Navarange <rasikan@google.com>
Cr-Commit-Position: refs/heads/main@{#1305095}
2024-05-23 15:19:02 +00:00
Rasika Navarange
303cdf240f Revert "[Chrome Stdlib] Use DEPS to download diff test data"
This reverts commit 6c8f992499.

Reason for revert: b/342182426

Original change's description:
> [Chrome Stdlib] Use DEPS to download diff test data
>
> We want to download Perfetto test data via GCS dependencies in DEPS
> rather than Perfetto's test_data script. To make this change we:
>
> 1. Modify the test_data.py script to wrap
>    `upload_to_google_storage_first_class.py` instead of Perfetto's
>    `test_data` script.
> 2. Add a Presubmit check to ensure the .sha256 files are in sync with
>    the deps entries.
> 3. Update docs to give instructions for the new workflow
>
> Change-Id: I20616c95553f93603e338dd9fa47e84facfb60d8
> Bug: 312895063
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545295
> Reviewed-by: Stephen Nusko <nuskos@chromium.org>
> Commit-Queue: Rasika Navarange <rasikan@google.com>
> Reviewed-by: Dominic Battre <battre@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1304407}

Bug: 312895063
Change-Id: I07872d3e5bdc550a6795197d396c11dadbbd3a3d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5558666
Commit-Queue: Zachary Tan <tanzachary@chromium.org>
Auto-Submit: Rasika Navarange <rasikan@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Zachary Tan <tanzachary@chromium.org>
Owners-Override: Zachary Tan <tanzachary@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304506}
2024-05-22 16:44:43 +00:00
Rasika Navarange
6c8f992499 [Chrome Stdlib] Use DEPS to download diff test data
We want to download Perfetto test data via GCS dependencies in DEPS
rather than Perfetto's test_data script. To make this change we:

1. Modify the test_data.py script to wrap
   `upload_to_google_storage_first_class.py` instead of Perfetto's
   `test_data` script.
2. Add a Presubmit check to ensure the .sha256 files are in sync with
   the deps entries.
3. Update docs to give instructions for the new workflow

Change-Id: I20616c95553f93603e338dd9fa47e84facfb60d8
Bug: 312895063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545295
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: Rasika Navarange <rasikan@google.com>
Reviewed-by: Dominic Battre <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304407}
2024-05-22 14:09:23 +00:00
Victor Hugo Vianna Silva
dbe815499a [android/ios/presubmit] Warn about deprecated sync consent predicates
Bug: 40066949
Change-Id: Ib3dda14f33c6bea7ffcd12b6f8803d6d1a5e4095
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5553534
Reviewed-by: Dominic Battre <battre@chromium.org>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/main@{#1303675}
2024-05-21 11:09:15 +00:00
Austin Sullivan
a6054e0b5c webnn: Avoid duplicate object files if multiple backends are enabled
//services/webnn/<backend> has many duplicate names. To avoid
collisions of object file names if e.g. the DML and TFLite backends
are both enabled, these duplicate names are changed to be suffixed
with <backend>

Bug: 325612086
Change-Id: I4038e9e796cd26d22167c96c540db7fb24f0e484
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5532906
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Dominic Battre <battre@chromium.org>
Reviewed-by: ningxin hu <ningxin.hu@intel.com>
Auto-Submit: Austin Sullivan <asully@chromium.org>
Reviewed-by: Dominic Battre <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303328}
2024-05-20 16:31:29 +00:00
Glen Robertson
9142ffd708 Fix false-positive in unique_ptr presubmit check with mismatched <>
Presubmit was preventing upload of crrev.com/c/5534806 due to changed
line:
` std::unique_ptr<WebAppInstallInfo>>(`
being interpreted as a call to the unique_ptr constructor. IIUC this was
because the check only looks at the changed lines and missed the extra
">" indicating this was really part of a larger template expression.

Added a condition that suppresses the check when selected brackets are
mismatching (ie. number of < and > are not equal). Added tests for these
cases.

Change-Id: I260b7826eb1f55764a8a93b3402888afa5032eed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5538411
Reviewed-by: Dirk Pranke <dpranke@google.com>
Auto-Submit: Glen Robertson <glenrob@chromium.org>
Commit-Queue: Glen Robertson <glenrob@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301700}
2024-05-16 01:37:47 +00:00
Fiona Macintosh
025ab45411 Fix TRACKING_PROTECTION explanation formatting
Currently the explanation appears vertically rather than horizontally

Change-Id: Ice8b177997de22dfaae574085a12f4d2d2cc492d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539637
Auto-Submit: Fiona Macintosh <fmacintosh@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301573}
2024-05-15 21:11:58 +00:00
Marijn Kruisselbrink
2a2d5fc4cd Allow OS-suffices in test support files
Similar to how foo_unittest_mac.cc is considered a test file in our
presubmits, this change also allows foo_test_support_mac.cc etc for
OS specific versions of test support code.

Change-Id: I8afd08f9a6eab9953f66e745fe06f5e5c1f01878
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540232
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301312}
2024-05-15 15:23:49 +00:00
Sven Zheng
8e0795673c Merge bisect script to //tools/bisect-builds.py
Move //tools/bisect/bisect_builds.py to //tools/bisect-build.py
as suggested.

Bug: b:331228820
Change-Id: Ia6a007342f03f97874c67d6b909989edc1e6ec6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530978
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299471}
2024-05-10 20:11:06 +00:00
Helmut Januschka
b5330a2352 Remove std::to_string() from //extensions
Removes std::to_string() and uses either base::NumberToString()
or base::FormatNumber().

Bug: 335672557
Change-Id: I63fd000e78368104e42a91dfbdc367d873b17811
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5515023
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Auto-Submit: Helmut Januschka <helmut@januschka.com>
Cr-Commit-Position: refs/heads/main@{#1299200}
2024-05-10 13:38:26 +00:00
Daniel Cheng
364216a7d9 Add a pointer to the header in the PRESUBMIT check for base::to_address
Saves a trip to codesearch/grep/et cetera.

Change-Id: Icab776d9b1e6c272424588c59b85eb1f2278f6a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520162
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1297740}
2024-05-07 20:25:43 +00:00
punithbnayak
dda49e5dd9 Use [[likely]] and [[unlikely]] in //chrome/
as discussed in this thread: https://groups.google.com/a/chromium.org/g/cxx/c/bk9YC5qSDF8/m/LLzo7uS8AgAJ?utm_medium=email&utm_source=footer

Bug: 40256217
Change-Id: I99b56f03952457dfb6ba9cc2f2fe9aac3698efbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5496820
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Punith Nayak <punithbnayak@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1294753}
2024-05-01 03:17:35 +00:00
Ciara McMullin
acdb11258c Update presubmits to allow integrating components/ip_protection/ with BlindSignAuth for better code sharing across platforms.
Bug: 333875655
Change-Id: I47b5f80098d3697de55befc898c06d9c345cddeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5498741
Reviewed-by: Brianna Goldstein <brgoldstein@google.com>
Commit-Queue: Ciara McMullin <ciaramcmullin@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1294481}
2024-04-30 18:20:33 +00:00
Arthur Sonzogni
a3dec41dd5 partition_alloc: Wrap //build header into partition_alloc.
Goal:
-----
Remove the //build dependency from partition_alloc. This
allows using this library from Skia. At the end, we will
be able to protect Skia from UAFs.
https://docs.google.com/document/d/1eSomKe-CoTSaaEhaCNySBzIaljXmsimm1_8kD4Aj8Tk/edit#heading=h.mv26uxhv0bsa

This patch:
-----------
Wrap the //build header by its //partition_alloc wrapped version.
This makes it easier in a follow-up to remove the dependency by
replacing the implementation.

Bug: 1508847
Change-Id: Icfd1a8f60278d5459b35d5a5c62cf8ebe46ce344
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5205331
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293618}
2024-04-29 12:05:37 +00:00
Helmut Januschka
d86a98c4d1 Remove std::to_string() // c/browser
removes std::to_string() and uses either base::NumberToString()
or base::FormatNumber()

Bug: 335672557
Change-Id: I866e2096da824ab1299ea091c535dfa9c98d4ac9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5483410
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Theodore Olsauskas-Warren <sauski@google.com>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293594}
2024-04-29 10:39:41 +00:00
Teresa Mao
1d91088be3 WebUI: Migrate cr_components/most_visited/ to Lit, part 1.
Migrate most_visited.ts.

Bug: 40943652
Change-Id: I5ba6c8a52f5170a972c7d8f9b0d96e6aacf8641d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5446975
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Teresa Mao <temao@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293249}
2024-04-26 21:06:25 +00:00
Michelle Abreo
6b743782ae Add presubmit check for TP content setting.
Bug: b:304424308
Change-Id: Ic36226a1ae37e87f649fead2f6009c189e35a383
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5490481
Reviewed-by: Fiona Macintosh <fmacintosh@google.com>
Commit-Queue: Michelle Abreo <michelleabreo@google.com>
Reviewed-by: Dominic Battre <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293127}
2024-04-26 17:29:04 +00:00
Alison Gale
cb598de565 Update todo presubmit to link an externally available bug
Also update the message to briefly describe how to get the ID

Bug: 321899722
Change-Id: Id9958340fc670e24f687825b99b4e85ba3f16a58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5482848
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293104}
2024-04-26 17:03:25 +00:00
Stephanie Kim
ec4f55a476 Reland "Add presubmit error when adding new download from google storage hook"
This is a reland of commit 729bfb6635

What's changed: Previously it was picking up affected files from paths
that end in DEPS, such as chrome/test/DEPS, because it was extracting
the basename. Changed it to look at the full path so it should only
analyze changes from src/DEPS.

Original change's description:
> Add presubmit error when adding new download from google storage hook
>
> If a user adds a new hook using the download_from_google_storage
> script, presubmit will error and tell the user to add it as a first
> class dep instead.
>
> Bug: b/324418194
> Change-Id: Id074b36d341f9ebadbb5301b36203f3b8122174e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5447679
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Cr-Commit-Position: refs/heads/main@{#1289381}

Bug: b/324418194
Change-Id: Ifbdd55c0db2b8d306f5edce7dc973c2a5ef46ed1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5472455
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#1291938}
2024-04-24 16:54:02 +00:00
Sven Zheng
273ac1df52 Format bisect_builds.py
Previously we import the file with minimal changes to
preserve the code as it is.

Format the script to comply presubmit.

Bug: 332933533
Change-Id: I9e1bc4409261e8de5b8a1df524ddab45d2b29e31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5478273
Auto-Submit: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#1291486}
2024-04-23 19:46:24 +00:00
Helmut Januschka
281b7aa778 Remove std::to_string() // ash
removes std::to_string() and uses either base::NumberToString()
or base::FormatNumber()

Bug: 335672557
Change-Id: Idaa49563337bfd08bd65a6f509faa94a6a77703c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5465729
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Denis Kuznetsov <antrim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291227}
2024-04-23 13:25:35 +00:00
Arthur Sonzogni
c66e9c85b6 PRESUBMIT: Fix AffectedSourceFile's mock.
Context:
--------

I was surprised @clamy was forced to use `DanglingUntriaged-notes` while
moving a file. This is unexpected. Especially given this behavior was
tested [0].

Root Cause:
-----------

The root cause is a divergence in between the depot_tool implementation
[1][2] using `include_deletes=False` and Chromes's mocks implementation
[3][4] using `include_deletes=True`.

The test was correctly written, but the environment not correctly
simulated ;-(
This patches reconcile the two.

[0]: https://source.chromium.org/chromium/chromium/src/+/main:PRESUBMIT_test.py;l=5144-5167
[1]: https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=810-817
[2]: https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=1377?q=%22def%20AffectedSourceFiles%22%20-f:third_party
[3]: https://source.chromium.org/chromium/chromium/src/+/main:PRESUBMIT_test_mocks.py;l=106-107
[4]: https://source.chromium.org/chromium/chromium/src/+/main:PRESUBMIT_test_mocks.py;l=273-275

Bug: chromium:1395297
Change-Id: I646adbe9e53dfe606bfcfacd41b4f794d49042be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5447014
Reviewed-by: Dominic Battre <battre@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291133}
2024-04-23 07:53:04 +00:00
Daniel Cheng
3498f42cde Ban std::to_string() use
It was previously just a warning; allowlist existing violations and
upgrade this to an error to prevent it from just being ignored.

Bug: 335672557
Change-Id: I3eb7527776b0fc838abac48a41da48f0bb9e0079
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5464669
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290030}
2024-04-19 17:36:19 +00:00