0
Commit Graph

1280 Commits

Author SHA1 Message Date
Vigen Issahhanjan
fdf9de575d [cast_core] Add chromecast/cast_core to the shared_ptr exception list.
CastCore uses gRPC stubs which require use of std::shared_ptr in
grpc::CreateChannel API.

Bug: b:210127896
Test: none
Change-Id: I15d0f425b673083592c62ae3caf19772563ad256
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3351268
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Vigen Issahhanjan <vigeni@google.com>
Cr-Commit-Position: refs/heads/main@{#953634}
2021-12-22 21:13:59 +00:00
Eric Willigers
929dcba17a Retire exclusions from pre-submit checks
neterror.css no longer uses obsolete CSS, thus it no longer needs to be
excluded from checks.

distilledpage_ios.css was removed in
https://chromium-review.googlesource.com/c/chromium/src/+/1956372

Change-Id: I6670a714ac891132d34b8656e5ddc6eea9a9c589
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3343506
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#953432}
2021-12-22 04:52:30 +00:00
Lijin Shen
260f08574f [Messages] Add presubmit warning for adding new Android InfoBars
Add presubmit warnings for adding new Android InfoBars
1. Check whether a new id is appended in infobar_delegate.h
2. Check whether new files are created under android infobar
   related folders

Bug: 1233156
Change-Id: I0e9b0800cb806196e4432b0fbd5439c1d0dd937d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3328682
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Reviewed-by: Aishwarya Rajesh <aishwaryarj@google.com>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Lijin Shen <lazzzis@google.com>
Cr-Commit-Position: refs/heads/main@{#952415}
2021-12-16 17:20:33 +00:00
Jameson Thies
0ce669fdbb Ignoring deleted files in CheckAssertAshOnlyCode Presubmit Check
Changing the list of files checked by CheckAssertAshOnlyCode to ignore
deleted files. Without ignoring deleted files, this presubmit check will
block any CL which moves or deletes a BUILD.gn file.

Bug: 1278154
Change-Id: Id3abc80a8da242b3224ce341cafb056e2ca28066
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3325066
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#950089}
2021-12-09 15:56:56 +00:00
seanmccullough
56d1e3cf1e update inclusive language presubmit to filter out "master"
Change-Id: Ia7ea28dd584ee36706e374732523596009766030
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293582
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Sean McCullough <seanmccullough@google.com>
Cr-Commit-Position: refs/heads/main@{#948067}
2021-12-03 18:18:32 +00:00
Takuto Ikuta
3697651942 PRESUBMIT: fix CheckPythonShebang for deletion diff
This is fix for
https://ci.chromium.org/ui/p/chromium/builders/try/chromium_presubmit/1473703/overview

Bug: 1191100
Change-Id: I6ccf95b1a293a5f9889e4acc956b31c1ede9df27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3307145
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946738}
2021-11-30 23:15:27 +00:00
Henrique Ferreiro
f9819f2e35 Use #!/usr/bin/env python/2/3 in remaining .py files
Replace every shebang like /usr/bin/python[23] with /usr/bin/env
python[23] as appropriate in Chromium and Blink, except for WPT. Also,
add a presubmit check to disallow the former going forward.

build/print_python_deps.py is changed from using python2.7 to python2.

remoting/ python scripts are left out as they are meant to be run in
users' machines.

Bug: 1191100
Change-Id: If7ebf7bd8ad9b2695a471e0a403a592815a0d959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537832
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946427}
2021-11-30 13:31:56 +00:00
Lukasz Anforowicz
7016d05e80 Presubmit checks that reject raw_ptr<T> in Renderer-only code.
Bug: 1073933
Change-Id: I2ab8ce4c0f73d763a784e4252ed2704a2a9f087a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3296265
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946313}
2021-11-30 03:56:27 +00:00
Henrique Ferreiro
2a4b55942f Add assert(is_chromeos_ash) in Ash directories
This CL adds assertions to check that the code in ash/,
chrome/browser/ash/ and chrome/browser/ui/ash/ is only used in Ash
builds.

Additionally, a presubmit check is added to verify that this assertion
is included in every BUILD.gn file contained in an ash/ directory at any
depth.

Change-Id: Id655e40ed8a6f3f01dfd0686b92a7f908d17844d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3301058
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946216}
2021-11-29 23:45:36 +00:00
Henrique Ferreiro
2e1aa10961 Fix CheckChromeOsSyncedPrefRegistration regex
The CheckChromeOsSyncedPrefRegistration presubmit check had a wrong
regexp for matching the string 'chromeos' as a path component. This CL
fixes that and improves its test to catch this problem in the future.

Change-Id: I632e1c6c4e45253eb263e683fb34f7f41abab498
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3302111
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/main@{#946178}
2021-11-29 22:22:12 +00:00
Garrett Beaty
4d4fcf6587 Add infra-try-recipes-tester to known robots.
The infra-try-recipes-tester can make cherry-picks of CLs used for
testing the recipes. The cherry-picks are not submitted, they are just
used as the target for builds ensure that the recipes perform correctly
running on branches as they diverge from trunk.

Bug: 1273255
Change-Id: If21897b6f0e36134899935ad3671194c350a864a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3300499
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Cr-Commit-Position: refs/heads/main@{#945031}
2021-11-24 17:57:47 +00:00
Yao Li
7f5a705dc5 presubmit: Add hint for std::unique_ptr usage error
The hint points to base::WrapUnique, for when it's not possible to use
std::make_unique<T>() as suggested in existing hint.

Bug: None
Test: Trying to submit a CL with the given issue would show the new
error message.
Change-Id: Ifabfc5ebd2e46e3fe5ff0e6cc1adafd063b2dae6

Change-Id: I49045962b178b97584ad952f8e0117c17df5b849
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3296674
Auto-Submit: Yao Li <yaohuali@google.com>
Commit-Queue: Yao Li <yaohuali@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#944702}
2021-11-23 22:30:56 +00:00
Erik Staab
c734cd7ac5 [Presubmit] Don't import / run irrelevant checks.
Many checks are only relevant to certain files so we can
skip them when those files aren't modified.

This is particularly helpful for sparse checkouts where unrelated
tools and scripts might not be in the tree.

Bug: 1236623
Change-Id: I3e2979b846f420b81492d29f2f2d023215e447ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3294521
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Erik Staab <estaab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#944371}
2021-11-23 03:11:52 +00:00
Kevin McNee
967dd2d241 Add presubmit to cc an MPArch watchlist for uses of concerning APIs
With the MPArch project which enables projects like bfcache,
prerendering, and fenced frames, a number of assumptions in the code
base relating to a tab only having one page at a time are no longer
valid [1].

In the interest of avoiding backsliding, let's set up a watchlist for
uses of APIs which can contribute to these problematic assumptions.

[1] https://docs.google.com/document/d/1NginQ8k0w3znuwTiJ5qjYmBKgZDekvEPC22q0I4swxQ/edit?usp=sharing

Bug: 1190019
Change-Id: If06c08a922a8d80129c59bd9ba03e726fed0f25c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3276815
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941694}
2021-11-15 16:09:29 +00:00
Mohamed Heikal
112874d41f Re-enabled pydeps check and fix stale pydeps
pydeps check was silently disabled when we migrated to python3 due to
the way it checks if it is running on linux. Fixed the issue and updated
all stale pydeps files

Bug: None
Change-Id: I213eb317601237f957302021699a896d81d95c97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3276200
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941667}
2021-11-15 14:42:20 +00:00
Mohamed Heikal
21e1994bae Add a flatbuffer java template
Bug: 1233661
Change-Id: I79342f998d2a9f34d1bdaf8c739faef2db9f42d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3273632
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: David Maunder <davidjm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941328}
2021-11-12 21:37:21 +00:00
Peter Boström
d002a3bee7 Remove DISALLOW_ macros from base/macros.h
This removes DISALLOW_COPY(), DISALLOW_ASSIGN() and
DISALLOW_COPY_AND_ASSIGN() from base/macros.h. PRESUBMITs are also
updated to no longer check for these macros.

IWYU removal is left as a separate change just in case this needs to be
reverted.

Bug: 1010217
Change-Id: I9e0877f31df2cdd7fe4a850321866cb31fed64e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3261552
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#938828}
2021-11-05 17:17:19 +00:00
danakj
30f053594e Add the third-party Cargo.toml.orig files
These files are part of the crates downloaded from crates.io, and we
should include the entire contents of third-party packages. We have to
allow these files to be uploaded in PRESUBMIT.py as well.

They are already un-ignored in //third_party/rust/.gitignore.

R=adetaylor@chromium.org, dpranke@chromium.org

Change-Id: I6750a2380aa191eb143cb06745d9ebb9aaed9ddb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3260146
Reviewed-by: Adrian Taylor <adetaylor@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937978}
2021-11-03 18:58:41 +00:00
Peter Boström
4502a9d333 Remove DISALLOW_IMPLICIT_CONSTRUCTORS() definition
This should hopefully no longer be depended on by libassistant.

Bug: 1010217
Change-Id: I2621bbc1df1d93734dbef880f10d0fe2ff4b5998
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3258183
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937944}
2021-11-03 17:09:29 +00:00
Tomasz Tylenda
15aa98232c Revert "Remove DISALLOW_IMPLICIT_CONSTRUCTORS()"
This reverts commit 5625bdd791.

Reason for revert: breaks compile on https://ci.chromium.org/p/chrome/builders/ci/chromeos-eve-chrome and https://ci.chromium.org/p/chrome/builders/ci/chromeos-kevin-chrome

Original change's description:
> Remove DISALLOW_IMPLICIT_CONSTRUCTORS()
>
> This removes the macro definition and presubmit checks and all existing
> instances are inlined.
>
> IWYU is left as a separate step until all DISALLOW_* macros are removed.
>
> Bug: 1010217
> Change-Id: Ibc4d90d6a1f244a01e65cd3c5a9c50e5419ea5a1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3257088
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Owners-Override: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Peter Boström <pbos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#937250}

Bug: 1010217
Change-Id: I6341be7521fde453b671d6b339eef796a49847ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3256685
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Owners-Override: Henrik Boström <hbos@google.com>
Commit-Queue: Tomasz Tylenda <ttylenda@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937292}
2021-11-02 12:30:23 +00:00
Peter Boström
5625bdd791 Remove DISALLOW_IMPLICIT_CONSTRUCTORS()
This removes the macro definition and presubmit checks and all existing
instances are inlined.

IWYU is left as a separate step until all DISALLOW_* macros are removed.

Bug: 1010217
Change-Id: Ibc4d90d6a1f244a01e65cd3c5a9c50e5419ea5a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3257088
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937250}
2021-11-02 09:17:40 +00:00
Jonathan Njeunje
e45f2bdedc [CodeHealth] Migrate PRESUBMITs from Python 2 to Python 3
With fixes for any subsequent breakage.

Bug: 1223892
Change-Id: I12d3ba1849253816ce7c3dc5ca6994c435a34457
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3206056
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Jonathan Njeunje <njeunje@chromium.org>
Cr-Commit-Position: refs/heads/main@{#930583}
2021-10-12 16:21:58 +00:00
Daniel Cheng
2dbf9c4caf Fix a typo in PRESUBMIT.py
dcheng@ forgot to run the tests. Oops. (It turns out there's several
other pre-existing failures…)

Change-Id: I7b09139173ec1481cd076b57b5a5b67807a04edc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3209508
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jordan Bayles <jophba@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#928855}
2021-10-06 21:26:11 +00:00
Andrew Grieve
3111943fbb Android: Delete support for "Classic Desugar"
There's no reason to keep this tool around.

Bug: 1015559
Change-Id: I595324a2813e03ec017d9428f5cffb44b3178ab0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3206870
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#928755}
2021-10-06 17:53:09 +00:00
Peter Kasting
53fd6ee437 TimeDelta factory function migration.
To aid conversions, first removed "using base::TimeDelta;" and converted
TimeDelta to base::TimeDelta in the affected files.  Then converted all
TimeDelta::FromX() and TimeDelta().FromX() (!) into X().

The changes in this CL were all performed by tools; no manual
interventions occurred.

Bug: 1243777
Change-Id: Iddcb80d7883fd494d2209d01945a6553f316ff95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3202380
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#928323}
2021-10-05 20:40:48 +00:00
Ben Kelly
39bf6bef27 CacheStorage: Store WASM code cache.
This CL enables storing WASM code cache in cache_storage.  Changes
include:

* Plumbing the cache_storage cache name through the various layers in
  order to send the compiled data back to cache_storage.
* Making service workers load the cache_storage side data blob for
  responses with a WASM mime type.
* Fixing a race condition in v8_wasm_response_extension.cc where it
  could check for code cache before it was finished being loaded from
  disk.
* Adds a test verifying the code cache was correctly generated and
  used via devtools tracing.  (Unfortunately the test hits a flaky
  issue within the devtools framework and is marked SKIP for now.)

Bug: 1252950
Change-Id: Icf655e2c8b0792d6799d339e3753a56c2ab84436
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3199655
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927872}
2021-10-04 22:54:58 +00:00
Daniel Cheng
ab58289c41 Relax std::unique_ptr<T>() check to warning.
This PRESUBMIT warning has some false positives, e.g.:

** Presubmit ERRORS **
The following files use std::unique_ptr<T>(). Use nullptr instead.
  components/autofill_assistant/browser/basic_interactions.cc:548
      base::DoNothingAs<void(std::unique_ptr<TriggerContext>)>());

While `nullptr` is nicer than `std::unique_ptr<T>()`, it is also not
serious enough of a problem to warrant blocking on false positives.

Bug: 1252980
Change-Id: I173db5be48991c2468e299eb26f505d54c2f6afa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198472
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#926920}
2021-09-30 20:53:19 +00:00
Gabriel Charette
d90bcc9572 [base] Finish migration of many old ThreadRestrictions calls
Many callsites migrated or were deleted since the original deprecation.
Allowing a final push to remove them all!

Removed ThreadRestrictions::
  SetIOAllowed(bool allowed)
    In favor of ScopedAllow/DisallowBlocking()
  SetSingletonAllowed(bool allowed)
    In favor of ScopedDisallowSingleton()
  AssertSingletonAllowed()
    Moved to internal::
  DisallowWaiting()
    In favor of scoper.
  SetWaitAllowed(bool allowed)
    In favor of ScopedAllow/DisallowBaseSyncPrimitives

Introducing PermanentThreadAllowance::Allow*() with friends for
the very few use cases that required permanent allowance.

Fixed many friends usage (some were even referring to deleted code..!)

This leaves only ScopedAllowIO to migrate under the old
"ThreadRestrictions" namespace!

Bug: 766678
Change-Id: I3b581eaa92992efa4ecf1a2db919062fc7c8fbb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3153342
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Owners-Override: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923148}
2021-09-21 00:23:10 +00:00
Nina Satragno
f766053b00 Add presubmit warning for forgetting MAYBE_prefix
When disabling tests based on some condition, sometimes developers
forget to add a MAYBE_ prefix to the test they're disabling. This
presubmit check warns when a #define MAYBE_* is found without a
corresponding TEST(MAYBE_...). A slightly modified version of the script
ran against all C++ tests found 16 cases (see crbug.com/1248543).

The check misses some cases where there is ambiguity (such as having
multiple instances of the same test or suite name in the file), and
there are rare false positives across the codebase (such as wrapping
test names in macros), but it should be good enough for a warning.

Fixed: 1246006
Change-Id: Idc330d61fb928baf4d45296ca2b9cd15ee03c284
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3169473
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#922961}
2021-09-20 18:03:35 +00:00
Mila Green
d3fc6a4d0a Updater: Install the new Keystone bundle with the Updater.
This change creates a new app bundle named "GoogleSoftwareUpdate".
The bundle contains the replacement for the "ksadmin" tool, used by
Keystone's registration framework. The structure is as follows:
GoogleUpdater
  Contents
    Helpers
      ksadmin
    Info.plist
    MacOS
      GoogleSoftwareUpdate
    PkgInfo

Note: As there are many references to GoogleSoftwareUpdate.bundle and
ultimately we are trying to provide an in-place replacement for it,
I had to change the "mac_app_bundle" template to support the production
of a ".bundle".

Bug: 1247725
Change-Id: Ib717aab5682a04d84e50334f5b63f458c98c8a33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3149833
Commit-Queue: Mila Green <milagreen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Cr-Commit-Position: refs/heads/main@{#920275}
2021-09-10 17:38:23 +00:00
Mila Green
e3aa722211 Updater: ksadmin replacement.
Add a ksadmin binary for chrome mac updater in order to facilitate the use of the new updater from applications which are packaged with Keystone's Registration Framework, which delegates work to ksadmin.

Bug: 1244983
Fixed: 1244983
Change-Id: I9fe7a7d4190c54a0ed5cb2245a89f6707b9fb3b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3046464
Commit-Queue: Mila Green <milagreen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918820}
2021-09-07 16:34:08 +00:00
David Dorwin
fa9aef4999 [fuchsia] Log startup & version for all production components
This INFO log occurs once per instance of these components and thus is
not spammy. Especially for Runners and WebEngine, it can be useful to
confirm that there is not a version mismatch when installing a new
version.

This also ensures that the WebEngine version is logged (by web_instance)
in cases where ContextProvider is never used, such as when only using
the runners to create Contexts.

Bug: 1010222
Change-Id: I3dff5d85df40f50d642bb4960cb4e10e0d8a80fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2863254
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#912493}
2021-08-17 06:46:20 +00:00
Theresa Sullivan
3b3e115615 Delete empty third_party/feed_library
Change-Id: I222af21433b546c52525e653d53f99edb02cb809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3074813
Reviewed-by: Dan H <harringtond@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Theresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#912414}
2021-08-17 01:00:54 +00:00
Sven Zheng
f7abd31d72 Adds two service accounts for Lacros and skylab
We need these accounts for Lacros and skylab testing.
Using new accounts will give us finer-grained permissions.
These accounts will only submit cl to
testing/buildbot/variants.pyl and generated json files.

Bug: 1234067
Change-Id: Ie9eda8c48177e26af46bbec7437ca90156e6f7a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3078495
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#909896}
2021-08-09 19:06:23 +00:00
Peter Boström
7ff415269c Provide RemoveAllChildViews default arguments
This makes RemoveAllChildViews default to deleting children that are not
set_owned_by_client(). A separate method,
RemoveAllChildViewsWithoutDeleting(), is added for pre-existing calls
that do not delete children. This method is marked as deprecated.

Removing explicit arguments to RemoveAllChildViews() is so far only done
in ui/views, follow-up CLs will remove them everywhere and eventually
remove the `delete_children` parameter from RemoveAllChildViews()
indicating that there should not be a way to remove children from a View
without either removing them or retaining their `unique_ptrs`.

Bug: 1044687
Change-Id: I0c823949dd0c32a6af7f6bfcc9c8bf1287cd3650
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3057500
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Allen Bauer <kylixrd@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#906559}
2021-07-29 03:43:27 +00:00
Matt Stark
6ef0887198 Create presubmit to ensure GRD files are consistent.
TEST=Run presubmits locally
BUG=None

Change-Id: I6d779f897c5a467927ac4ce8f34b3fb7f9fb4152
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3054674
Auto-Submit: Matt Stark <msta@google.com>
Commit-Queue: Matt Stark <msta@google.com>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#906508}
2021-07-29 01:21:46 +00:00
Bruce Dawson
aae5e65263 Reland "Fix build_config.h presubmit"
This reverts commit 83a4552de0.

Reason for revert: Fixed to handle deleted files by specifying
include_deletes=False.

Original change's description:
> Revert "Fix build_config.h presubmit"
>
> This reverts commit 76c67f3bea.
>
> Reason for revert: This change causes the presubmit check to fail for changes that move files. AffectedFiles() includes a file's old name from before moving, so ReadFile() tries to read a file that doesn't exist.
>
> Example log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8843618273276417712/+/u/presubmit_py3/stdout
>
> Original change's description:
> > Fix build_config.h presubmit
> >
> > Chromium has a presubmit to make sure that nobody uses macros likes
> > OS_WIN without first including build/build_config.h. It's a good idea
> > but it had two flaws:
> >
> > 1) It only detects bugs in new lines of code. Existing abuses of the
> > OS_* macros are often ignored.
> > 2) It confirms that build/build_config.h is included, but it does not
> > confirm that it is included before the macro is used.
> >
> > Both of these issues appeared in
> > content/web_test/browser/web_test_download_manager_delegate.cc. This
> > source file uses some Windows types and it appeared to include
> > windows.h, but it actually didn't, because OS_WIN is used before it is
> > defined. This bug is being fixed separately.
> >
> > This change fixes both presubmit issues.
> >
> > Change-Id: I66b37f3d4ec528910d7240414c8acbe2c87d6e82
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2981136
> > Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
> > Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
> > Commit-Queue: Mike Pinkerton <pinkerton@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#895132}
>
> Change-Id: Icd23cb27c73f448e88eabb27b903c66e0fd4b9c5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2982304
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
> Commit-Queue: Ian Wells <iwells@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#895188}

Change-Id: I93f1909d02777732ad8174a26e7dd7fa00bb3adf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2982308
Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
Reviewed-by: Ian Wells <iwells@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#895588}
2021-06-24 15:05:39 +00:00
Ian Wells
83a4552de0 Revert "Fix build_config.h presubmit"
This reverts commit 76c67f3bea.

Reason for revert: This change causes the presubmit check to fail for changes that move files. AffectedFiles() includes a file's old name from before moving, so ReadFile() tries to read a file that doesn't exist.

Example log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8843618273276417712/+/u/presubmit_py3/stdout

Original change's description:
> Fix build_config.h presubmit
>
> Chromium has a presubmit to make sure that nobody uses macros likes
> OS_WIN without first including build/build_config.h. It's a good idea
> but it had two flaws:
>
> 1) It only detects bugs in new lines of code. Existing abuses of the
> OS_* macros are often ignored.
> 2) It confirms that build/build_config.h is included, but it does not
> confirm that it is included before the macro is used.
>
> Both of these issues appeared in
> content/web_test/browser/web_test_download_manager_delegate.cc. This
> source file uses some Windows types and it appeared to include
> windows.h, but it actually didn't, because OS_WIN is used before it is
> defined. This bug is being fixed separately.
>
> This change fixes both presubmit issues.
>
> Change-Id: I66b37f3d4ec528910d7240414c8acbe2c87d6e82
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2981136
> Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
> Commit-Queue: Mike Pinkerton <pinkerton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#895132}

Change-Id: Icd23cb27c73f448e88eabb27b903c66e0fd4b9c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2982304
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
Commit-Queue: Ian Wells <iwells@chromium.org>
Cr-Commit-Position: refs/heads/master@{#895188}
2021-06-23 17:06:48 +00:00
Bruce Dawson
76c67f3bea Fix build_config.h presubmit
Chromium has a presubmit to make sure that nobody uses macros likes
OS_WIN without first including build/build_config.h. It's a good idea
but it had two flaws:

1) It only detects bugs in new lines of code. Existing abuses of the
OS_* macros are often ignored.
2) It confirms that build/build_config.h is included, but it does not
confirm that it is included before the macro is used.

Both of these issues appeared in
content/web_test/browser/web_test_download_manager_delegate.cc. This
source file uses some Windows types and it appeared to include
windows.h, but it actually didn't, because OS_WIN is used before it is
defined. This bug is being fixed separately.

This change fixes both presubmit issues.

Change-Id: I66b37f3d4ec528910d7240414c8acbe2c87d6e82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2981136
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
Commit-Queue: Mike Pinkerton <pinkerton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#895132}
2021-06-23 14:26:51 +00:00
Ari Chivukula
45f58dd539 Fix checkperms.py error in PRESUBMIT
If the permissions are wrong for a file (for example:
tools/grit/minify_with_uglify_unittest.py is 644 instead of 755) and you
run `git cl presubmit` it will no longer fail. This failure is a python3
issue with subprocess returning binary arrays instead of strings.

Bug: 1221378
Change-Id: I30a9d4f8ae649415f236863dfe2199961083e76d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2972103
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#893689}
2021-06-18 04:23:04 +00:00
Mohamed Heikal
246710c882 [Android] Enable unused resources removal on bundle targets (relandx2)
This reverts commit 7be1e6f2c3.

Fixes issue with missing R.txt files (by still outputting them).

Bug: 636448,1216318
Change-Id: I879ba0449554f71636f7c337a46e2fbca68684cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2953886
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#892081}
2021-06-14 15:34:30 +00:00
Bruce Dawson
b2cfdfecaf Actually fix CheckForWindowsLineEndings
Perhaps due to a recent git change (no longer showing \r\n line ending
differences) the recent fix to CheckForWindowsLineEndings still doesn't
work. This change uses input_api.ReadFile rather than f.ChangedContents
to get the file text and this reliably finds \r\n line endings.

Bug: 801033
Change-Id: I35d047bff4545664a2524990bf752de8a53af805
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2951931
Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#891322}
2021-06-10 19:01:20 +00:00
Victor Hugo Vianna Silva
c22e0208b3 Rename ProfileSyncServiceHarness to SyncServiceImplHarness
No behavior is changed.

R=treib@chromium.org

Bug: 1201272
Change-Id: I3bc72dca412725590675cd5718a7a12245780e05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2940859
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#890909}
2021-06-09 19:46:21 +00:00
Ben Mason
7be1e6f2c3 Revert "[Android] Enable unused resources removal on bundle targets (reland)"
This reverts commit 520114b5a7.

Reason for revert: Official build failure: crbug.com/1217496

Original change's description:
> [Android] Enable unused resources removal on bundle targets (reland)
>
> Fixes issue if different modules have conflicting resource names.
>
> Bug: 636448, 1216318
> Change-Id: I707497c3d1c8fea1d7dddb216706e5f1ce2cff56
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2941203
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#889740}

Bug: 636448
Bug: 1216318
Change-Id: Iba0c3a0875e579b4d51b4cb6534c1c14251fd9b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2945202
Reviewed-by: Ben Mason <benmason@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ben Mason <benmason@chromium.org>
Owners-Override: Ben Mason <benmason@chromium.org>
Cr-Commit-Position: refs/heads/master@{#890476}
2021-06-08 22:18:11 +00:00
Bruce Dawson
6141d4a77e Fix CheckForWindowsLineEndings
CheckForWindowsLineEndings checks many different types of text files but
the list did _not_ include .h files, which naturally is where I have
hit problems. This change adds header files to the list.

This change also asks ChangedContents to preserve line endings, since
otherwise there won't be anything to check. That is, for a long time
CheckForWindowsLineEndings has been a NOP because it was getting lines
whose line endings were already trimmed. Note that the option to
preserve line endings was added recently in change crrev.com/c/2910488
and this change will not work with versions of depot_tools prior to
that change.

Bug: 801033
Change-Id: I91b9783ff7da72ef432854ce0cddd70abbce6860
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2911914
Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#890266}
2021-06-08 15:56:11 +00:00
Sigurdur Asgeirsson
d272114cde Remove ScopedObserver from base.
ScopedObserver is being deprecated in favor of two new classes:
- base::ScopedObservation for observers that only ever observe
  a single source.
- base::ScopedMultiSourceObservation for observers that do or may
  observe more than a single source.

Bug: 1145565
Change-Id: I3169858882de4efb16a63a847940a9e3bc249d96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2944549
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#890208}
2021-06-08 12:37:32 +00:00
Mohamed Heikal
520114b5a7 [Android] Enable unused resources removal on bundle targets (reland)
Fixes issue if different modules have conflicting resource names.

Bug: 636448, 1216318
Change-Id: I707497c3d1c8fea1d7dddb216706e5f1ce2cff56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2941203
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#889740}
2021-06-07 13:27:42 +00:00
John Palmer
0e0f72bf9c [COIL] Change chromium code search type links to use main rather than master
This CL finishes the changes for all files not in third_party.
Top level files were missed by the script, docs changes due to multiple entries on the same line which were not caught by script, but manually fixed up.
    See this doc: go/chromium-coil-change for more info
    BUG=1210385

Change-Id: I6d92e2e6fd244174cc370662399fa713a7b8abf5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2927090
Auto-Submit: John Palmer <jopalmer@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#889685}
2021-06-07 09:10:20 +00:00
Eric Seckler
0f10f39d0a Revert "[Android] Enable unused resources removal on android bundle targets"
This reverts commit 3f66b9ee6f.

Reason for revert: breaks android-builder-perf, see crbug/1216318

Original change's description:
> [Android] Enable unused resources removal on android bundle targets
>
> Bug: 636448
> Change-Id: I4bb156503f568b4e81924e7f62b2d6748ce34048
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2907078
> Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
> Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#888944}

Bug: 636448
Bug: 1216318
Change-Id: Ia96b494e9872a37371e0cfaf8ff97fe6c4601c84
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2940245
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Peter Conn <peconn@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#889185}
2021-06-04 08:38:34 +00:00
Mohamed Heikal
3f66b9ee6f [Android] Enable unused resources removal on android bundle targets
Bug: 636448
Change-Id: I4bb156503f568b4e81924e7f62b2d6748ce34048
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2907078
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#888944}
2021-06-03 18:52:47 +00:00