* 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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}