0
Commit Graph

1479 Commits

Author SHA1 Message Date
David Benjamin
ea985a206c Make base::StringPiece implicitly convert to/from std::string_view
With absl::string_view turned into std::string_view,
abseil_string_conversions.h is now misnamed. However, those conversions
themselves are only needed because Chromium has forked a fundamental C++
vocabulary type.

As an intermediate state, until we make base::StringPiece into
std::string_view itself, add implicit conversions from/to the standard
type. This simplifies boundaries between external code, where the safe
pattern is currently tedious and the unsafe pattern (decomposing into
ptr/len) is much shorter.

However, this is imperfect. You may still need std::string_view in
places. E.g. implementing std::string_view-based interfaces, APIs that
take or return pointers, or cases when multiple implicit conversions are
chained together.

To that end, this reshuffles PRESUBMITs and guidelines:

- In Chromium, absl::string_view is now always std::string_view.
  Whenever you would have said absl::string_view, say
  std::string_view instead.

- However, for now, base::StringPiece is still distinct from
  std::string_view and the guidelines still prefer base::StringPiece
  over it. So, when you need std::string_view to deal with an
  external API, use std::string_view. Otherwise, use
  base::StringPiece.

(This is the same as the status quo, except absl::string_view is
replaced with std::string_view, and using the more standard spelling
when needed for  3p APIs is spelled out more explicitly. In other
cases, our non-standard spelling remains the preference.)

Existing uses of absl::string_view are left alone, but as they're the
exact same type, references can be freely and incrementally converted
to std::string_view.

Having two vocabulary types is still costly as developers must keep
track of the two, but it's better than three.  The only way to truly
remove this cost is to merge base::StringPiece into std::string_view,
now that they are at parity in safety checks.  This CL leaves that
decision for later, though its author is strongly of the opinion that we
should do it. :-)

As part of this, this removes the existing uses of
abseil_string_conversions.h, and cleans up some conversions and base
dependencies in the to-be-extracted net/der and net/cert/pki that are
no longer necessary.

Bug: 691162, 1370553
Change-Id: I0629029c157819ce673598caeb0f106917244f6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4427593
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132183}
2023-04-18 22:05:01 +00:00
Mohamed Heikal
133e1f2b2e Add support for baseline profiles in trichrome bundle and chrome apk (Relandx2)
A different profile downstream will be used for what we actually ship,
the upstream profile is there to ensure the rules are tested by CQ.
Currently disabled by gn arg until bundletool and/or playstore support
bundles with baseline profiles in non-base splits.

This reverts commit cabd06a100.
Reason for reland: Landing disabled behind a gn arg

Bug: 1378676
Change-Id: Ie14607293d17f9baba469637dfc99b3943260108
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4395063
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132110}
2023-04-18 20:04:37 +00:00
Avi Drissman
491617ccca Ban the inclusion of <objc/objc.h>
It's dangerous in mixed ARC/non-ARC code.

Fixed: 1429730
Change-Id: I6f65fdeb8077f43a53076db36528f2bf0e4ca82e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4406661
Commit-Queue: Avi Drissman <avi@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1129944}
2023-04-13 17:33:15 +00:00
Louise Brett
c6d2387a00 Manifest parsing for tab strip home tab scope
Parses the "scope_patterns" field for the tab_strip.home_tab manifest
field. This field contains a list of URLPatterns.

Design doc: go/tabbed-pwas-scope

Bug: 1381374
Change-Id: I9b5d3cbfc940b8d31382a6d8de7b4bf53cc51da7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4179490
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Louise Brett <loubrett@google.com>
Cr-Commit-Position: refs/heads/main@{#1128459}
2023-04-11 02:48:32 +00:00
Gauthier Ambard
4d8756bdd4 [iOS] Move symbols to shared folder
This CL moves the symbols from ios/c/b/ui/icons to the shared folder.
Also updates PRESUBMIT.py to take into account the new path.

Bug: 1319852
Change-Id: I07f6686942febe5c6feecede7e83da1326306b4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4408909
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1127645}
2023-04-07 17:26:41 +00:00
Arthur Sonzogni
60348572e2 Ban CrossThread[Weak]Persistent.
The code health rotation is working on converting them toward
blink::CrossThread[Weak]Handle:
https://docs.google.com/document/d/1GIT0ysdQ84sGhIo1r9EscF_fFt93lmNVM_q4vvHj2FQ/edit?hl=en&forcehl=1#heading=h.d4kh33tn5cz9

This adds a presubmit warning to avoid introducing new cases.

Bug: 1370013
Change-Id: I23d55028a7b04c85f4bd449d593344b827e76616
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4365923
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1127573}
2023-04-07 10:22:52 +00:00
dpapad
2efd445225 Make scheme relative URLs default in html_to_wrapper().
This is a follow-up to the similar CL at http://crrev.com/c/4375918
which made it the default for build_webui().

Scheme-relative URLs are shorter, and also can work in both chrome://
and chrome-untrusted:// contexts. Making them the default seems like a
safer option.

Bug: None
Change-Id: Ice10f7700730eaa30396c8a5d326cc314ccf7cb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4404334
Reviewed-by: Cole Horvitz <colehorvitz@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126966}
2023-04-06 01:43:45 +00:00
Vincent Boisselle
861f11db51 Revert "Add presubmit check for correct sha1 format in .png.sha1 files."
This reverts commit 069d82c9d8.

Reason for revert: cause failure in strings presubmit tests when updating grd strings, example: http://crrev.com/c/4377359

Original change's description:
> Add presubmit check for correct sha1 format in .png.sha1 files.
>
> Benmason@ explained that a recent submission of a png file as png.sha1
> file resulted in all images on that day not to be uploaded to TC.
>
> Change-Id: Iea7632de1ae4fd644bb4bce7f1fc907c3254459b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4374003
> Reviewed-by: Dominic Battré <battre@chromium.org>
> Reviewed-by: Ben Mason <benmason@chromium.org>
> Commit-Queue: Jens Mueller <muellerj@google.com>
> Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1123014}

Change-Id: Icc0c43bbd82ed16d6370b139242f2f632449a8ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1428712
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4378561
Reviewed-by: Ernesto Izquierdo Clua <eic@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Vincent Boisselle <vincb@google.com>
Commit-Queue: Vincent Boisselle <vincb@google.com>
Cr-Commit-Position: refs/heads/main@{#1123295}
2023-03-28 21:46:38 +00:00
Mohamed Heikal
3d7a94ce2b Migrate android.support.test to androidx.test (the rest)
The java changes should be a noop since we automatically do this rewrite
in compile_java.py. Also replace
//third_party/android_support_test_runner targets with
//third_party/androidx ones.
Additionally fix non-java files eg: docs, presubmits, scripts

This affects files outside //android_webview, //chrome, //components and
//weblayer which are covered by other cls.

Bug: 1428304
Change-Id: I2906b7530127983e6110e9ab5773843df0dd3ba8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4375857
Reviewed-by: Peter Wen <wnwen@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1123104}
2023-03-28 16:55:24 +00:00
Jens Mueller
069d82c9d8 Add presubmit check for correct sha1 format in .png.sha1 files.
Benmason@ explained that a recent submission of a png file as png.sha1
file resulted in all images on that day not to be uploaded to TC.

Change-Id: Iea7632de1ae4fd644bb4bce7f1fc907c3254459b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4374003
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Ben Mason <benmason@chromium.org>
Commit-Queue: Jens Mueller <muellerj@google.com>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1123014}
2023-03-28 14:42:02 +00:00
Andrew Grieve
21bb67928a Skip CheckLibcxxRevisionsMatch() for sub-repo changes
//clank runs all presubmits from //, but this check does not make sense
in that context.

Bug: 1428313
Change-Id: I68a67c8347ae3d214ccc1462a097385b52350e1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4375278
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1122571}
2023-03-27 19:06:48 +00:00
Arthur Sonzogni
1da65fa8d6 Fix several errors in PRESUBMIT BanRule
1. The 'explanation' is expected to be a tuple. I didn't know about it,
   and tried to copy the previous rule, who used a string. When a string
   is used, the 'explanation' is displayed with one letter per line.
   This patches adds an assertion, and fix every errors. Only one was
   found.

2. One rule was using a regexp, but forgot to tag it with a slash
   prefix.

3. Fix indentation.

Bug: None
Change-Id: If9fa2d9f5d552a36a8e86eef6a54aa01e8660e6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4370679
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1122440}
2023-03-27 16:01:52 +00:00
Hans Wennborg
23a81d5b43 Add presubmit to check libcxx_revision is in sync between files
Updating one without touching the other can cause havoc on the bots,
so having a presubmit seems worth it.

Bug: 1335426
Change-Id: Ic8587c1bd8841625f418b64e9b3488623f936846
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4369959
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1121734}
2023-03-24 16:38:13 +00:00
Peter Kasting
cc1525209d Narrow presubmit check for modules-related keywords.
While "export" is a reserved keyword, "import" and "module" are only
conditionally reserved, and so can also be used for identifiers. Try to
detect the specific patterns used with modules, so we don't warn on e.g.
setting the value of a variable named "module".

Bug: 1284275
Change-Id: I9d6ad24d9e6b5ff1efc29cb4448f3751fd806417
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4354531
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120753}
2023-03-22 20:17:37 +00:00
Joshua Pawlicki
cabd06a100 Revert "Add support for baseline profiles in trichrome bundle and chrome apk (Reland)"
This reverts commit d479bec94c.

Reason for revert: Breaks android-archive-rel: https://ci.chromium.org/ui/p/chromium/builders/ci/android-archive-rel/31602/overview

Original change's description:
> Add support for baseline profiles in trichrome bundle and chrome apk (Reland)
>
> A different profile downstream will be used for what we actually ship,
> the upstream profile is there to ensure the rules are tested by CQ.
>
> This reverts commit c406a96831.
>
> Reason for reland: fix issue when incremental_install = true
>
> Binary-Size: Profiles take space unfortunately.
> Bug: 1378676
> Change-Id: Ic4b554d1a0a422f257ae0b4e5119733d12d2b101
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4350539
> Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1120017}

Bug: 1378676
Change-Id: Ic9800b2a5608e68fb3002be83e6d59f43ef65707
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4358393
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Joshua Pawlicki <waffles@chromium.org>
Auto-Submit: Joshua Pawlicki <waffles@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1120089}
2023-03-21 18:53:07 +00:00
Mohamed Heikal
d479bec94c Add support for baseline profiles in trichrome bundle and chrome apk (Reland)
A different profile downstream will be used for what we actually ship,
the upstream profile is there to ensure the rules are tested by CQ.

This reverts commit c406a96831.

Reason for reland: fix issue when incremental_install = true

Binary-Size: Profiles take space unfortunately.
Bug: 1378676
Change-Id: Ic4b554d1a0a422f257ae0b4e5119733d12d2b101
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4350539
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120017}
2023-03-21 17:17:51 +00:00
Mohamed Heikal
c406a96831 Revert "Add support for baseline profiles in trichrome bundle and chrome apk"
This reverts commit 448adfa33e.

Reason for revert: breaks gn gen when incremental_install = true

Original change's description:
> Add support for baseline profiles in trichrome bundle and chrome apk
>
> A different profile downstream will be used for what we actually ship,
> the upstream profile is there to ensure the rules are tested by CQ.
>
> Binary-Size: Profiles take space unfortunately.
> Bug: 1378676
> Change-Id: I854f1ebbabdf15c3b5f943083e8481a7f8be7747
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4294696
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
> Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1118307}

Bug: 1378676
Change-Id: Ib850fe9cdfe6061b7266b22e1325257c19eed3c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4346535
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Peter Wen <wnwen@chromium.org>
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1118330}
2023-03-16 20:50:44 +00:00
Mohamed Heikal
448adfa33e Add support for baseline profiles in trichrome bundle and chrome apk
A different profile downstream will be used for what we actually ship,
the upstream profile is there to ensure the rules are tested by CQ.

Binary-Size: Profiles take space unfortunately.
Bug: 1378676
Change-Id: I854f1ebbabdf15c3b5f943083e8481a7f8be7747
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4294696
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1118307}
2023-03-16 20:28:01 +00:00
Gauthier Ambard
d36c10b168 [iOS] Update ios PRESUBMIT
Exclude the search_widget_extension from the systemImageNamed rule.
The helper to replace +[UIImage systemImageNamed:] is not available
for the widget.

Bug: 1424351
Change-Id: I63d1564040ef10c7a3fe4a543349d9778e1d9f96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4334347
Auto-Submit: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1117989}
2023-03-16 08:45:03 +00:00
Peter Kasting
c7460d980c Walk back overzealous banning of <random>.
We intended to ban engines and generators, but not distributions, from
<random>. I recently changed the guide and PRESUBMIT scripts to ban it
wholesale because I didn't read the email threads closely enough.  Oops.

Also shortens the regex (that already existed) that was detecting
engines and generators.

Bug: none
Change-Id: Iac6b0fa136fbd980ed7a11778ef78f9496df9d03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4337769
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1117202}
2023-03-14 21:01:42 +00:00
Mike Dougherty
4d1050b713 Update iOS JavaScript presubmit to support moved files
The presubmit currently prevents moving a JavaScript file to a new
location. This CL allows such CLs by using a warning instead of an error
if a script of the same name was deleted and added in the examined diff.

Change-Id: I0c5761b5f774bea8a6733e78c2ef0a31d47eab9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4335695
Reviewed-by: Dominic Battré <battre@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1117004}
2023-03-14 15:59:53 +00:00
Peter Kasting
69357dc260 Catch use of modules, which would likely break Clang 16 (Cronet).
Bug: 1284275
Change-Id: I38279865fe1cbc8c7a77573623fa0e7119cda2e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4334879
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1116732}
2023-03-14 01:34:29 +00:00
Henrique Nakashima
bbf2b2687c [Android] Ban RecordHistogram.getHistogram*ForTesting
These counts are error prone since the values are not reset at the
beginning of batched tests. Use HistogramWatcher instead to check deltas
and to get better error messages.

Bug: 1412888
Change-Id: I17de6ebb028d3c94ed3f01382a2bfeb3ee7b2a14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4321928
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1115763}
2023-03-10 17:21:39 +00:00
Bruce Dawson
6cb2d4d627 Specify encoding when opening text files in PRESUBMIT.py
When opening a text file it is important to specify encoding='utf-8'
since otherwise the behavior will depend on your system locale. This
change fixes the remaining omissions in PRESUBMIT.py files, found by
running "git cl presubmit --all" with crrev.com/c/4290775 patched in.

These are the last two known errors in PRESUBMIT.py files.

Bug: 1418846
Change-Id: I39e2f08887439594b637643e4ce782b5e4782450
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4296977
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1111831}
2023-03-01 21:35:09 +00:00
Jens Mueller
2085ff8583 Add link to more documentation about instrumentation test batching.
Change-Id: I6166d340b32682e806401580c35a0373322304b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4290994
Commit-Queue: Dominic Battré <battre@chromium.org>
Reviewed-by: James Shen <zhiyuans@google.com>
Auto-Submit: Jens Mueller <muellerj@google.com>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1110280}
2023-02-27 11:54:49 +00:00
Bruce Dawson
58a45d26f8 Specify encoding when opening text files
When opening a text file it is important to specify encoding='utf-8'
since otherwise the behavior will depend on your system locale. This
change fixes various encoding omissions in PRESUBMIT.py files, found by
running "git cl presubmit --all" with crrev.com/c/4290775 patched in.

This CL was uploaded by git cl split.

R=battre@chromium.org

Bug: 1418846
Change-Id: Ia14d9c87966b6e54bdd0adf3c446979bca97f77a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4292641
Commit-Queue: Dominic Battré <battre@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1110260}
2023-02-27 11:24:16 +00:00
Min Qin
bc44383cb2 Add PRESUBMIT rule for ban VectorDrawableCompat import in Java
VectorDrawableCompat Could take a long time to complete, so adding
a ban to let users use the alternative class with trace events.

BUG=b/242038130

Change-Id: I174c918e7dd5fef15a551eace33d1bdfb3d203e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4266131
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1108408}
2023-02-22 17:25:26 +00:00
Joe Mason
804d3d151b Remove browser_watcher (2/3): Delete components/browser_watcher.
Also deletes the related classes in base/debug/activity_analyzer.* and
base/debug/activity_tracker.*.

Many files include base/debug/activity_tracker.h and do work iff a
GlobalActivityTracker object exists. To keep this patch self-contained
it replaces the classes in activity_tracker.h with no-op stubs instead
of deleting it, so that all files that include it will still compile.
A followup will delete activity_tracker.h and all uses of it.

This should not cause any behaviour change because GlobalActivityTracker
is only created when the ExtendedCrashReporting feature is enabled, so
all uses of activity_tracker.h are already no-ops in production.

Bug: 1415328
Change-Id: I940fb0e013a3ae7a939136099f34791dec914db9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4265975
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Joe Mason <joenotcharles@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1107725}
2023-02-21 14:38:25 +00:00
Yao Li
359937b89d Avoid logging crypto key value from remote command in release build
ArcCertInstaller puts crypto key value into remote command, and the
command is being logged by SYSLOG.

SYSLOG is always active, regardless of logging level and applied flags.
This CL changes the logging to DLOG, so the key value is only logged in
debug build, not release build.

Bug: b:263394136
Test: autoninja -C out_hatch/Release/ chrome chrome_sandbox nacl_helper

Change-Id: I3d662bc439988622e006cfb45a171f9e51020f4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4237413
Reviewed-by: Muhammad Hasan Khan <mhasank@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Miriam Polzer <mpolzer@google.com>
Reviewed-by: Igor <igorcov@chromium.org>
Commit-Queue: Yao Li <yaohuali@google.com>
Cr-Commit-Position: refs/heads/main@{#1105950}
2023-02-15 23:43:03 +00:00
Peter Kasting
e2c5ee8cfd Misc. styleguide/PRESUBMIT updates.
The styleguide updates are mostly for consistency. The PRESUBMIT
updates are for both consistency and to ban various
won't-be-allowed-when-we-enable-C++20 constructs (we should ban in
advance of announcing C++20 availability, since all platforms now build
in C++20 mode and it's easy for people to sneak these in).

Bug: 1284275
Change-Id: I8b90c4bbd14dd2202486688220166225eb44cbec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4246721
Owners-Override: danakj <danakj@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1105710}
2023-02-15 17:23:08 +00:00
Ted Choc
f40ea915e3 Remove hardcoded profile from android TemplateUrlServiceFactory.
Migrates the easier (e.g. already had an Profile reference) usages
to the new method that takes a Profile.

Adds a PRESUBMIT to try and prevent additional getLastUsedRegularProfile()
calls.

BUG=1410601

Change-Id: I65a63d02eacb3459367ad3e6cf056d346aac8044
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4241300
Reviewed-by: Donn Denman <donnd@chromium.org>
Reviewed-by: Tomasz Wiszkowski <ender@google.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1105179}
2023-02-14 19:02:39 +00:00
Caroline Liu
a705013eac Reland "[fuchsia] cast_streaming_shell and web_engine_shell attempt to PresentView with fuchsia.element.GraphicalPresenter."
This reverts commit 7bc47d6300.

Reason for revert: Relanding now that https://fxrev.dev/798731 and
https://fxrev.dev/801490 have rolled in, and manual test runs of video playback performance tests pass.

Original change's description:
> Revert "[fuchsia] cast_streaming_shell and web_engine_shell attempt to PresentView with fuchsia.element.GraphicalPresenter."
>
> This reverts commit 0605b82197.
>
> Reason for revert: Causing failures in encrypted video playback tests.
>
> Original change's description:
> > [fuchsia] cast_streaming_shell and web_engine_shell attempt to PresentView with fuchsia.element.GraphicalPresenter.
> >
> > As a fallback, we still connect to fuchsia.ui.policy.Presenter. This is preferred to using config-data or an
> > alternative component manifest to explicitly configure which
> > presentation protocol to use for the following reasons:
> > * The fallback is a temporary measure while the two shells are
> >   transitioned to the new presenter protocol. There is no intention of
> >   making this permanent, as the removal of the fallback protocol is
> >   scheduled soon after the safe migration onto the preferred protocol.
> > * If there are any issues in the migration, the shells will be resilient
> >   against any reverts or relands by being compatible to whichever
> >   protocol is available at the time.
> >
> > Bug: 1351007
> > Test: autoninja -C out/fuchsia telemetry_gpu_integration_test_fuchsia && content/test/gpu/run_gpu_integration_test_fuchsia.py cast_streaming --browser=cast-streaming-shell --out-dir=out/fuchsia
> >
> > Change-Id: I9910dc8fb4dd8e3c64bbaafdd7cc2a9b0da047fb
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067808
> > Reviewed-by: Wez <wez@chromium.org>
> > Commit-Queue: Caroline Liu <carolineliu@google.com>
> > Reviewed-by: Greg Thompson <grt@chromium.org>
> > Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
> > Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1094482}
>
> Bug: 1351007
> Change-Id: Id4f0cdf0f2f17b71567d39bfaff5d5ad809c509f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4204527
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Greg Thompson <grt@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Daniel Cheng <dcheng@chromium.org>
> Auto-Submit: Rohan Pavone <rohpavone@chromium.org>
> Owners-Override: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1098865}

Bug: 1351007
Change-Id: I1a11c0498244dc437577ca4c896c466b672cb458
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4210272
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Caroline Liu <carolineliu@google.com>
Cr-Commit-Position: refs/heads/main@{#1104714}
2023-02-13 22:23:15 +00:00
Kevin McNee
1746306427 Remove MPArch triage rotation presubmit
We are winding down the triage rotation, so the associated presubmit
script can be removed.

Bug: 1190019
Change-Id: If6226bae54a7bfc71df95211d6c00f12db10dd6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4228276
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103922}
2023-02-10 17:49:18 +00:00
Peter Kasting
6d77e9d62e Make formal decisions on more C++17 features, plus cleanup.
* Stop listing std::chrono_literals as banned, since <chrono> is already banned.
* Alphabetize C++17 feature lists.
* Allow the following TBD C++17 language features:

`constexpr` lambdas
Declaring non-type template parameters with `auto`
`__has_include`
Lambda capture `this` by value (i.e. allows capturing `*this`)
`using` declaration for attributes

* Allow the following TBD C++17 library features:

3D `std::hypot`
Searchers
`std::atomic::is_always_lock_free`
`std::exclusive_scan`
`std::gcd`
`std::has_unique_object_representations`
`std::inclusive_scan`
`std::is_aggregate`
`std::is_swappable`
`std::launder`
`std::lcm`
`std::make_from_tuple`
`std::map::extract`/`std::map::merge`
Uninitialized memory algorithms

* Temporarily ban the following TBD C++17 library features. In all cases, we actually want the feature, but there's a bug open on "convert uses of our existing replacement to the C++17 version and remove it", so the ban will be reversed as part of fixing that bug:

`std::aligned_alloc`
`std::invoke`
`std::not_fn`
`std::string_view`

* Update DEPS for Abseil #includes to match current guidance.
* Update PRESUBMIT.py to match banned features above.

Bug: none
Change-Id: If53b81779df8117a84260e69979d00381ad761b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4219878
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103511}
2023-02-09 21:58:18 +00:00
Victor Vianna
77a40f622c [ios] Fix symbols presubmit/comment to point to correct file
crrev.com/c/3974453 moved chrome_symbol.h to symbol_helpers.h.

Bug: 1315544
Change-Id: I16ad87019a8aa684f854d424d71bf641a25a0005
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4198758
Auto-Submit: Victor Vianna <victorvianna@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/main@{#1099387}
2023-01-31 19:04:53 +00:00
Rohan Pavone
7bc47d6300 Revert "[fuchsia] cast_streaming_shell and web_engine_shell attempt to PresentView with fuchsia.element.GraphicalPresenter."
This reverts commit 0605b82197.

Reason for revert: Causing failures in encrypted video playback tests.

Original change's description:
> [fuchsia] cast_streaming_shell and web_engine_shell attempt to PresentView with fuchsia.element.GraphicalPresenter.
>
> As a fallback, we still connect to fuchsia.ui.policy.Presenter. This is preferred to using config-data or an
> alternative component manifest to explicitly configure which
> presentation protocol to use for the following reasons:
> * The fallback is a temporary measure while the two shells are
>   transitioned to the new presenter protocol. There is no intention of
>   making this permanent, as the removal of the fallback protocol is
>   scheduled soon after the safe migration onto the preferred protocol.
> * If there are any issues in the migration, the shells will be resilient
>   against any reverts or relands by being compatible to whichever
>   protocol is available at the time.
>
> Bug: 1351007
> Test: autoninja -C out/fuchsia telemetry_gpu_integration_test_fuchsia && content/test/gpu/run_gpu_integration_test_fuchsia.py cast_streaming --browser=cast-streaming-shell --out-dir=out/fuchsia
>
> Change-Id: I9910dc8fb4dd8e3c64bbaafdd7cc2a9b0da047fb
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067808
> Reviewed-by: Wez <wez@chromium.org>
> Commit-Queue: Caroline Liu <carolineliu@google.com>
> Reviewed-by: Greg Thompson <grt@chromium.org>
> Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1094482}

Bug: 1351007
Change-Id: Id4f0cdf0f2f17b71567d39bfaff5d5ad809c509f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4204527
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Rohan Pavone <rohpavone@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1098865}
2023-01-30 21:22:49 +00:00
Henrique Nakashima
cb4c55ab3e Add more info about @Batch annotation for instrumentation tests
Print expecitly that PER_CLASS should be preferred unless the test
has no side-effects and is not sensitive to side-effects.

Change-Id: Ibcf57d452254aa223b4b2eea1d759ce0337f1f49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4157153
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: James Shen <zhiyuans@google.com>
Cr-Commit-Position: refs/heads/main@{#1098797}
2023-01-30 20:09:09 +00:00
Keybo Qian
ec7dcb11cf Add Chrome branch_day builder service account to the known bots list.
Service account for automating the Chrome branch day task. For more details, please see the Monorail issue below.

Bug: 1309662
Change-Id: I75c23cd7de2f65b80a8a381e6d81e738924cc355
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4198789
Commit-Queue: Peter Wen <wnwen@chromium.org>
Commit-Queue: Rick Byers <rbyers@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Auto-Submit: Keybo Qian <keybo@google.com>
Commit-Queue: Keybo Qian <keybo@google.com>
Cr-Commit-Position: refs/heads/main@{#1098013}
2023-01-27 18:38:56 +00:00
Salma Elmahallawy
5297645b2a [PolicyLogs] Add Log Severity and Log Type to Avoid Log Duplication
This CL adds to the policy logger the functionality to add the logs to
the policy logger as well as the console. This allows us to simply
call LOG_POLICY(..) in policy related files instead of keeping the
original log lines and then calling LOG_POLICY with the same message
on the next line in code related to policy.

Bug: b/266480750
Change-Id: I9acee47b6d2c8d305678b5715f4cf4766b1549b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4190186
Reviewed-by: Yann Dago <ydago@chromium.org>
Commit-Queue: Salma Elmahallawy <esalma@google.com>
Cr-Commit-Position: refs/heads/main@{#1097958}
2023-01-27 17:04:49 +00:00
Benoit Lize
79cf05988f [base] Document that std::atomic is preferred to base::subtle atomics
std::atomic is much more widely used in the codebase vs base::subtle
atomics. Add a PRESUBMIT check and documentation in base/atomicops.h to
explain it.

Bug: 1194917
Change-Id: I73989f2b7ec3eb0a1f24649c33404a2010d0fddf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4197075
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1097834}
2023-01-27 10:01:57 +00:00
Peter Wen
eaa963f8b9 Android: Add basic Kotlin support
This CL adds initial build system support for compiling Kotlin code
alongside our existing support for compiling Java code. In order to
compile Kotlin code, we need to use the kotlinc binary (analogous to
javac), also added to DEPS in this CL.

Although kotlinc only compiles Kotlin code into .class files, for
targets that have a mix of Java and Kotlin source files, kotlinc needs
to also be passed the Java files in the same target. This is so that it
can resolve references from the Kotlin code to the Java code in the same
target. It does not compile the Java files passed to it. That is left to
a subsequent run of javac.

Similar to Bazel, Kotlin code is compiled first, a header .jar file for
the Kotlin code is created at the same time, then the header .jar file
is merged into the header .jar file for the Java files generated by
turbine, while the .class files from kotlinc are merged into the .class
files that are subsequently generated by javac. This way a single header
.jar file and a single .jar file with all .class files is the resulting
output of compilation steps.

Another change is that .sources files now contain both Java and Kotlin
files. This resulted in some updates to JaCoCo scripts (which are not
tested in this CL as no Kotlin code has been added, so JaCoCo should not
be affected). Android Lint should already support Kotlin code, so even
when Kotlin code is added Android Lint should continue to work.

Also add print_version.sh for kotlinc.

Bug: 1401205
Change-Id: Idbeda044a01ab58e819a98364b64ddcfbfc298d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4179272
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1095170}
2023-01-20 19:40:30 +00:00
Caroline Liu
0605b82197 [fuchsia] cast_streaming_shell and web_engine_shell attempt to PresentView with fuchsia.element.GraphicalPresenter.
As a fallback, we still connect to fuchsia.ui.policy.Presenter. This is preferred to using config-data or an
alternative component manifest to explicitly configure which
presentation protocol to use for the following reasons:
* The fallback is a temporary measure while the two shells are
  transitioned to the new presenter protocol. There is no intention of
  making this permanent, as the removal of the fallback protocol is
  scheduled soon after the safe migration onto the preferred protocol.
* If there are any issues in the migration, the shells will be resilient
  against any reverts or relands by being compatible to whichever
  protocol is available at the time.

Bug: 1351007
Test: autoninja -C out/fuchsia telemetry_gpu_integration_test_fuchsia && content/test/gpu/run_gpu_integration_test_fuchsia.py cast_streaming --browser=cast-streaming-shell --out-dir=out/fuchsia

Change-Id: I9910dc8fb4dd8e3c64bbaafdd7cc2a9b0da047fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067808
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Caroline Liu <carolineliu@google.com>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1094482}
2023-01-19 16:17:18 +00:00
Nasko Oskov
82dbf01666 Revert removing RenderViewHostChanged from Android WebView.
RenderViewHostChanged is an API that should no longer exist and was
removed in r1089075. It might have been the root cause of a regression
in Android WebView where some apps do not properly scale their content.
This CL does a partial restore of this API only in the case of WebView
as a speculative fix for the regression. The API will be removed
immediately after this regression is understood and properly fixed.

Bug: 1168562, 1394513, 1402440
Change-Id: I1a1738ac3e0a861436d28eb81cea77d068164dd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4149717
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Owners-Override: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091042}
2023-01-10 22:40:01 +00:00
Victor Vasiliev
23b9ea6a6a Roll src/net/third_party/quiche/src/ 4bdfa8105..9e26f7e92 (2 commits)
https://quiche.googlesource.com/quiche.git/+log/4bdfa810532a..9e26f7e9260e

$ git log 4bdfa8105..9e26f7e92 --date=short --no-merges --format='%ad %ae %s'
2023-01-04 fayang Deprecate gfe2_reloadable_flag_quic_donot_wake_up_stream_before_finish_reading_headers_v2.
2023-01-04 vasilvv Refactor WebTransport API to make it independent of QUIC.

Created with:
  roll-dep src/net/third_party/quiche/src

Change-Id: I4c88ccb947de863c89282040957ef37af911c327
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4138439
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bence Béky <bnc@chromium.org>
Commit-Queue: Victor Vasiliev <vasilvv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1089365}
2023-01-05 19:42:29 +00:00
Nasko Oskov
8547f04372 Remove RenderViewHostChanged from the codebase.
RenderViewHostChanged is an old WebContentsObserver API that has been
replaced by other APIs that take into account codebase-wide changes
such as MPArch and out of process iframes. All code has been migrated
to these new APIs and we can now remove the old one.

Bug: 1168562, 1394513
Change-Id: I4e5ebae6087b7920c00e7fafb2e73a05b464598f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4134103
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1089075}
2023-01-05 02:21:38 +00:00
Bruce Dawson
bb414db9e8 [HSTS] Temporarily raise maximum file size presubmit
The HSTS preload list is larger than the allowed maximum file size in
git.

As a bandaid to keep anything from breaking, this CL bumps up that limit
for transport_security_state_static.json from 20 MB to 25 MB. We are
actively working to reduce the size of the preload list and hope to do
so in Q1.

Context in crrev.com/c/4107590

Bug: 1394954
Change-Id: I71fba180cc255a641c91fca5a871a0da09553250
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4124057
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Joe DeBlasio <jdeblasio@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1087167}
2022-12-27 20:21:25 +00:00
Sven Zheng
76a79ea364 PRESUBMIT: Add crosapi need browser test check
When a new crosapi mojom file being added, we expect there should
also be a browser test being added.

This is a non-blocker check and only happens during git cl upload.
See my local test:

:~/chromium/src$ git diff HEAD~1
diff --git a/chromeos/crosapi/mojom/newfile.mojom b/chromeos/crosapi/mojom/newfile.mojom
new file mode 100644
index 0000000000000..fa1237e46e92b
--- /dev/null
+++ b/chromeos/crosapi/mojom/newfile.mojom
@@ -0,0 +1,4 @@
+// Copyright 2022 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
:~/chromium/src$ git cl upload
Running Python 3 presubmit upload checks ...
** Presubmit Warnings: 1 **
You are adding a new crosapi, but there is no file ends with browsertest.cc file being added. It is important to add crosapi browser test coverage to avoid version skew issues.
Check //docs/lacros/test_instructions.md for more information.

Presubmit checks took 2.5s to calculate.
There were Python 3 presubmit warnings. Are you sure you wish to continue? (y/N):

Bug: 1402823
Change-Id: Ibcac5f90fb7332cf7199e04a8eab48fda3ac5eb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4118248
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1086084}
2022-12-21 21:25:24 +00:00
Rebekah Potter
57aa94df8f WebUI: Move cr.m.js and load_time_data.m.js to ash/webui/common/
These files are only used on ChromeOS Ash, so they belong in this
directory and not in ui/webui/resources.

Note: adding exception to presubmit for cr.m.js, as this is a
pre-existing use of chrome.send that is relied on throughout many Ash
WebUIs.

Bug: 1347740
Change-Id: I94638b9c9d3b1f1f52c603bbfb3fcbc31d20f667
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4093977
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Auto-Submit: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1082692}
2022-12-13 20:30:58 +00:00
Bob Beck
5fc0be84df get rid of base/test/bind.h in unit tests
Just use a std::function for the callback

Bug: 1322914
Change-Id: Ib7094f6e2faf889dd94e7a377bae4dcafce8522b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4093895
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Bob Beck <bbe@google.com>
Cr-Commit-Position: refs/heads/main@{#1082137}
2022-12-12 23:32:52 +00:00
Bruce Dawson
55776c49a7 Improve messages when .grd entries are modified
It can be helpful to distinguish between modified and added .grd
entries. This came up recently when trying to fix the indentation in a
.grd file and these more specific messages _might_ have helped.

Typical messages will look like this:
** Presubmit ERRORS: 1 **
You are modifying UI strings or their meanings.
To ensure the best translations, take screenshots of the relevant UI (https://g.co/chrome/translation) and add these files to your changelist:
  chromeos\chromeos_strings_grd\IDS_SCANNING_APP_SCAN_BUTTON_TEXT.png.sha1

Actually fixing the indentation will be tried in a follow-up.

Bug: 1394970
Change-Id: I60fee3086a9826ef2f233c681164e5b309a6eec6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4081196
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1081514}
2022-12-09 17:23:47 +00:00