0
Commit Graph

825 Commits

Author SHA1 Message Date
Tibor Goldschwendt
360793f7a6 [presubmit] Use gclient_args.gni to check if checkout_android == true
Bug: 978509
Change-Id: I67b21a9d8e2276bfbf15bcd220be6cb82c949c57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676668
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Auto-Submit: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672157}
2019-06-25 18:23:49 +00:00
dpapad
7b493a4d37 Use ESLint to disallow __defineGetter__, __defineSetter__ and friends.
Previously these checks were customly implemented in PRESUBMIT.py

Bug: 720034,425829
Change-Id: I04a11f680ace0a6b7d250f4116562ce3710eb27a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670274
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671504}
2019-06-22 02:07:09 +00:00
Chris Hall
c31293615b Add PRESUBMIT check for deprecated __lookupSetter__ function.
R=dbeam,sky
BUG=425829

Change-Id: I3f5698bb00433f0db75ddf8a537a6d4385783e0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666575
Auto-Submit: Chris Hall <chrishall@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670962}
2019-06-20 18:02:24 +00:00
Francois Doray
177da2ca10 [threadpool] Add switch to log BEST_EFFORT tasks.
When the --log-best-effort-tasks switch is specified, information about
all tasks posted with BEST_EFFORT priority is logged. This is useful to
diagnose issues with preventing BEST_EFFORT tasks from running during
startup (and eventually during page load).

Bug: 887407
Change-Id: I366a78485c1588741519c7254f8e1ab57d1df140
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1660635
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670886}
2019-06-20 14:14:22 +00:00
Peter Kasting
991618a658 Change banned state of some C++11 features before default-allowing C++11.
* Unbans std::aligned_storage
* Bans string/number conversions
* Bans std::weak_ptr

The next patch set will default-allow all of C++11, meaning all remaining TBD
features will become allowed.

https://groups.google.com/a/chromium.org/d/topic/cxx/iH4v7yfKX2A/discussion

Bug: none
Change-Id: If90aa78a36580dea3c1e77497eb7ebcbdd725e53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1659968
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#669852}
2019-06-17 22:00:09 +00:00
John Abd-El-Malek
c7b069a4f9 Remove components/web_restrictions as it's not needed anymore.
Bug: 934009
NOPRESUBMIT=true

Change-Id: Ib803d9eefd306ffb43f5550f9e9502668d0b6511
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639350
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665818}
2019-06-04 04:55:16 +00:00
Fabrice de Gans-Riberi
a16cac8c95 [fuchsia] Implement the fuchsia.web.Debug API
* Add support for test suite-specific sandbox policy.
* Add fuchsia.web.Debug API to the ContextProvider service.
* Add tests for that API by using the Fuchsia Hub.

Bug: 955589
Change-Id: Icc5d9a91c30b55e71f6f104f8b7ea984b811a1a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578597
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665620}
2019-06-03 19:03:20 +00:00
kylechar
550739094e ozone: Cleanup callback types.
Remove some usage of deprecated callback types in ui/ozone/*. Where
possible convert to the corresponding once type, otherwise replace with
the repeating type.

Also update PRESUBMIT so that deprecated callback types are banned in
ui/ozone/*.

Bug: 714018
Change-Id: Ida5c8c028435a220344981d09e508f3e0dd711b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637399
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665558}
2019-06-03 16:17:43 +00:00
danakj
7a2b7086f5 Re-add the base::Bind/Callback/Closure presubmit on a list of paths
I have gone through the code with the following script, delving into
sub-directories where it seemed appropriate, to build a list of places
that still use base::Bind/Callback/Closure and need to be migrated. The
PRESUBMIT check will ignore those places to avoid warning fatigue and
people using BindRepeating randomly and incorrectly.

This allows the check to continue to be run against places that have
been converted and are now clean (such as cc, components/viz, ui/views)
to prevent the addition of new uses there.

It also gives a convenient burn-down list of places to fix, and they
can be removed as they are done so.

Uses .join() because just giving the whole list makes the presubmit
check 7% slower against one c++ file.

R=ajwong@chromium.org, dcheng@chromium.org

Bug: 947414
Change-Id: I7cda063a0e02c6b4a18e8229093af6d48dfe7fa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1622869
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661906}
2019-05-21 21:13:51 +00:00
Albert J. Wong
f3a7cb870c Remove Presubmit check for base::Bind()
It turns out that converting from base::Bind() ->
base::Bind{Once,Repeating} is often much harder than expected. It's not
mechanical and in particular going to BindOnce() -- which is hte
preferred binder -- may have a viral effect on an API.

Removing the warning as conversion is not going to be aided by nagging.

Bug: 947414, 714018
Change-Id: I1f82a480c420fe0c5cc61f3bf7a9245fa3ac7bb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1620611
Auto-Submit: Albert J. Wong <ajwong@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661566}
2019-05-21 01:10:23 +00:00
John Budorick
79b03a6f4d android: switch stack script to generate_wrapper.gni
Bug: 816629
Change-Id: Icbe9e55a4560d51ad9c384a66d0c7e2c7c730549
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1606599
Commit-Queue: John Budorick <jbudorick@chromium.org>
Auto-Submit: John Budorick <jbudorick@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661085}
2019-05-17 23:06:01 +00:00
Mirko Bonadei
28112c00c2 Disable presubmit for invalid defined check in ABSL code.
ABSL is trying to be -Wundef clean and sending a patch for these
macros seems overkill. They are used inside a __APPLE__ block with
this pattern:

#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#endif

Bug: None
Change-Id: I863d099dcc3a2588388afab24a61be89884b392b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612913
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660995}
2019-05-17 20:25:05 +00:00
Oksana Zhuravlova
1d3b59de49 [mojo] Change mojo::ConvertTo presubmit check from error to warning
Bug: 621383
Change-Id: Ie2da4387a8352073c6d2221274b39034c8ee285c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616148
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660665}
2019-05-17 00:08:22 +00:00
Oksana Zhuravlova
fd24777ec1 [mojo] Add presubmit check for TypeConverter
This change adds a check preventing new usages of mojo::ConvertTo since
TypeConverter is deprecated. The check excludes /third_party/blink and
content/renderer paths for now.

Bug: 621383
Change-Id: I63b36171447863cdd9ee0c42f973c2a8480ee4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1549453
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#660438}
2019-05-16 16:57:29 +00:00
Yun Liu
eb4075ddf9 Swith from Emma to Jacoco to generate Java coverage info
Emma is unsupported since 2005 and Jacoco is developed to replace Emma


Bug: 843307, 961793
Change-Id: I25689279972a0132dd8c41474de787f9aaa89a5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600337
Commit-Queue: Yun Liu <yliuyliu@google.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659169}
2019-05-13 19:47:58 +00:00
Patrick Monette
0196be2815 Move //chrome_elf to //chrome/chrome_elf
As chrome_elf.dll is basically a part of Chrome, it makes more sense to
have this directory under //chrome.

Change-Id: I84b3455271fb40184acc14cb542fbf9bb32e5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594167
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658405}
2019-05-10 03:33:15 +00:00
Makoto Shimazu
3ad422cd62 PRESUBMIT.py undestands line break in the middle of <affected-histogram> tag
Bug: 956838
Change-Id: Ic3868a4f85fc8e4c13f07022800234978b870ee7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1598390
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657577}
2019-05-08 02:35:14 +00:00
Dirk Pranke
d6d45c35be Fix the presubmit check for files that are too big.
We added a check that no one is trying to add a file > 20MB
to the repo in r655002. That check depended on stat'ing files
using the path relative to the repo root.

However, it turns out that changes in a nested repo can also
cause the presubmit checks in this repo to run, and the local
path stat doesn't work in that case (it uses the wrong git repo
root).

This CL switches the check to using full paths, which doesn't
have that problem.

Bug: 958106
Change-Id: I929473efba38d0a17eb37025abb8030cfb9fafb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1590446
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#655421}
2019-04-30 22:37:38 +00:00
Cliff Smolinsky
819516407b Reland "Implement StringFromGUID2 natively in Chromium"
This reverts commit 214190dc43.

Reason for revert: Original change was not the cause of the test
failure. The test failed to find a string resource which is unrelated
to the StringFromGUID2 changes in this CL.

Original change's description:
> Revert "Implement StringFromGUID2 natively in Chromium"
>
> This reverts commit b11abed764.
>
> Reason for revert: Suspect causing failure on Win7 Tests (dbg)(1) bot.
>
> Original change's description:
> > Implement StringFromGUID2 natively in Chromium
> >
> > This change implements StringFromGUID2 natively in Chromium in order to
> > avoid calling into ole32.dll. This is necessary to support the effort to
> > delayload user32.dll and gdi32.dll because StringFromGUID2 has some
> > callers in the renderer process and delayloading ole32.dll for this
> > method call will cause the process to crash.
> >
> > Bug: 948829
> > Change-Id: I00a2d5735984268813ecccc43aa3cb464d21c62c
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1575869
> > Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
> > Reviewed-by: Scott Violet <sky@chromium.org>
> > Reviewed-by: Reilly Grant <reillyg@chromium.org>
> > Reviewed-by: Tommi <tommi@chromium.org>
> > Reviewed-by: Misha Efimov <mef@chromium.org>
> > Reviewed-by: Greg Thompson <grt@chromium.org>
> > Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#654978}
>
> TBR=sky@chromium.org,tommi@chromium.org,mef@chromium.org,reillyg@chromium.org,emircan@chromium.org,brucedawson@chromium.org,ortuno@chromium.org,wfh@chromium.org,chfremer@chromium.org,grt@chromium.org,dougt@chromium.org,odejesush@chromium.org,cliffsmo@microsoft.com
>
> Change-Id: I8e434cfcab9a1626e435169e0a4d52991a3351c7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 957991
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1590055
> Reviewed-by: Ella Ge <eirage@chromium.org>
> Commit-Queue: Ella Ge <eirage@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#655239}

TBR=sky@chromium.org,tommi@chromium.org,mef@chromium.org,reillyg@chromium.org,emircan@chromium.org,brucedawson@chromium.org,ortuno@chromium.org,wfh@chromium.org,chfremer@chromium.org,grt@chromium.org,dougt@chromium.org,eirage@chromium.org,odejesush@chromium.org,cliffsmo@microsoft.com

Change-Id: Ie65fb1f45d50c1693a38d1a13ad5b868f4c50626
Bug: 957991,948829
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1590061
Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
Reviewed-by: Ella Ge <eirage@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#655392}
2019-04-30 21:39:51 +00:00
Ella Ge
214190dc43 Revert "Implement StringFromGUID2 natively in Chromium"
This reverts commit b11abed764.

Reason for revert: Suspect causing failure on Win7 Tests (dbg)(1) bot.

Original change's description:
> Implement StringFromGUID2 natively in Chromium
> 
> This change implements StringFromGUID2 natively in Chromium in order to
> avoid calling into ole32.dll. This is necessary to support the effort to
> delayload user32.dll and gdi32.dll because StringFromGUID2 has some
> callers in the renderer process and delayloading ole32.dll for this
> method call will cause the process to crash.
> 
> Bug: 948829
> Change-Id: I00a2d5735984268813ecccc43aa3cb464d21c62c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1575869
> Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Tommi <tommi@chromium.org>
> Reviewed-by: Misha Efimov <mef@chromium.org>
> Reviewed-by: Greg Thompson <grt@chromium.org>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#654978}

TBR=sky@chromium.org,tommi@chromium.org,mef@chromium.org,reillyg@chromium.org,emircan@chromium.org,brucedawson@chromium.org,ortuno@chromium.org,wfh@chromium.org,chfremer@chromium.org,grt@chromium.org,dougt@chromium.org,odejesush@chromium.org,cliffsmo@microsoft.com

Change-Id: I8e434cfcab9a1626e435169e0a4d52991a3351c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 957991
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1590055
Reviewed-by: Ella Ge <eirage@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#655239}
2019-04-30 15:47:58 +00:00
Avi Drissman
7382afa016 Ban NoCopy CF and NS creation functions that do not pass ownership.
Their safe use is difficult to reason about.

BUG=957254

Change-Id: I7c8c0dd5f89df86732d5839e85b164ca3cc686b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586887
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#655071}
2019-04-29 23:27:13 +00:00
Daniel Bratell
93eb6c684c Block files >20MB in presubmit check
To avoid bloating the chromium/src git repo with large binary
files, this adds a check that files are not too large and suggests
to use cloud storage otherwise.

Now without trying to check the size of deleted files and with the
limit increased to 20MB.

R=dpranke@chromium.org

Bug: 956017
Change-Id: Ieeb2e1a37017a375f9da7a48c7713077c4929ff3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1581971
Commit-Queue: Daniel Bratell <bratell@opera.com>
Auto-Submit: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#655002}
2019-04-29 20:13:36 +00:00
Cliff Smolinsky
b11abed764 Implement StringFromGUID2 natively in Chromium
This change implements StringFromGUID2 natively in Chromium in order to
avoid calling into ole32.dll. This is necessary to support the effort to
delayload user32.dll and gdi32.dll because StringFromGUID2 has some
callers in the renderer process and delayloading ole32.dll for this
method call will cause the process to crash.

Bug: 948829
Change-Id: I00a2d5735984268813ecccc43aa3cb464d21c62c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1575869
Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Tommi <tommi@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654978}
2019-04-29 19:43:18 +00:00
Peter Wen
e410bd79ee Android: Add android_library_factory target
Simplifies generating factory files that can be used for targets like
factory:public_java in feature code.

This CL converts keyboard_accessory/factory targets as an example.

Bug: 846440
Change-Id: Ib87892132ea5f8db0406df2d7136d1e3714cba6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584406
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654922}
2019-04-29 18:05:41 +00:00
Ben Lewis
a9514601d1 Add SHFileOperation to the Banned APIs list
After removing SHFileOperation from Chromium, to avoid re-introducing
callers this change adds this Windows API to presubmit's banned APIs
list.

Bug: 945501
Change-Id: I637142a27eb936db64b8ae7698c8f90f48e51938
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586736
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Ben Lewis <ben.lewis@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#654917}
2019-04-29 17:53:05 +00:00
John Budorick
f20c004594 Use DEPSed gclient.py for presubmit check.
Rather than the shell script found on the PATH. This will circumvent
gclient's attempts to call update_depot_tools.

Bug: 891734,790528
Change-Id: I1b5039390aa50ad10320ca80b02c026232c3b081
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584931
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654252}
2019-04-25 23:23:40 +00:00
John Budorick
bc3571aa4e Copy a revised version of sizes.py into //tools/binary_size.
Bug: 861983
Change-Id: I0181ba47efc6d2544e2190b8ccd795e1fd12768c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574828
Reviewed-by: Misha Efimov <mef@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653877}
2019-04-25 02:20:06 +00:00
Hiroshige Hayashizaki
bf4602d93a Revert "Block files >10MB in a presubmit check"
This reverts commit 343c786aa3.

Reason for revert: Presubmit failures on CLs with deleted files.
crbug.com/956247

Original change's description:
> Block files >10MB in a presubmit check
> 
> To avoid bloating the chromium/src git repo with large binary
> files, this adds a check that files are not too large and suggests
> to use cloud storage otherwise.
> 
> Bug: 956017
> Change-Id: Idf6e816a50030551fc6003b0f83b2071f685c9b5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1581803
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Daniel Bratell <bratell@opera.com>
> Cr-Commit-Position: refs/heads/master@{#653733}

TBR=dpranke@chromium.org,bratell@opera.com

Change-Id: I219913f0c95f8ff43499ef700ce4b939d6301bf0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 956017, 956247
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1581826
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653762}
2019-04-24 21:37:36 +00:00
Daniel Bratell
343c786aa3 Block files >10MB in a presubmit check
To avoid bloating the chromium/src git repo with large binary
files, this adds a check that files are not too large and suggests
to use cloud storage otherwise.

Bug: 956017
Change-Id: Idf6e816a50030551fc6003b0f83b2071f685c9b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1581803
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#653733}
2019-04-24 20:41:27 +00:00
Daniel Bratell
65b0332618 Find #include "foo.cc" with a presubmit check
An #include "foo.cc" will often compile, until it causes linking
problems later, for instance in jumbo builds. The error messages are
then not good at pointing out what is wrong.

Change-Id: Ic155dc5542e22b54d13c213230d6df4977263642
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566344
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653105}
2019-04-23 08:17:06 +00:00
Michael Giuffrida
7f93d69288 Fix more AppListController checks
When using Kiosk Next Shell, AppListController might not exist.
Also adds tests for these cases.

Bug: 954317
Change-Id: I5da308b5be540f56d11136c0456b455654f6da98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574952
Auto-Submit: Michael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652536}
2019-04-19 14:39:58 +00:00
Jinsong Fan
91ebbbd287 Add Presubmit check to recommend BuildInfo.isDebugAndroid
Since userdebug and eng builds are debuggable build of Android.
BuildInfo.isDebugAndroid() is preferred over `Build.TYPE.equals()` or
''.equals(Build.TYPE). The CL adds a presubmit check for that.

Bug: 939924
Change-Id: Id2794374f2185c1f0f50abf9424a87b07467567e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1564363
Commit-Queue: Jinsong Fan <fanjinsong@sogou-inc.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651269}
2019-04-16 14:57:17 +00:00
Kinuko Yasuda
376c2ce1b2 Refine mojo::DataPipe presubmit
Current presubmit is also triggered for the use of mojo::DataPipeDrainer,
which is not deprecated.

R=carlosk@chromium.org,rockot@google.com

Bug: 944990
Change-Id: I522e1ca26b55ad1ba6e2948e80381ba1d84e150e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1567707
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651097}
2019-04-16 01:20:37 +00:00
Nicolas Ouellet-Payeur
16730ab099 [BrowserSwitcher] Import external Browser Helper Object code
This CL imports the code for the Internet Explorer Browser Helper
Object (BHO) used by Legacy Browser Support. The new rule is
purposefully excluded from mini_installer.exe for now.

The code is imported from //googleclient/chrome/chrome_browserswitcher

The following changes were made to the original codebase:

- Add BUILD.gn rules to build the BHO DLL
- Remove unneeded code (e.g. XML parsing, InvokeAlternativeBrowser...)
- Flatten ie_bho/ and core/ folders
- Replace '#pragma once' with '#ifndef' guards, run 'git cl format'
- Update copyright comment in each file
- Add pre-generated header files from IDL

Bug: 950039
Change-Id: Ic4d05b360f6e93ff28afc2e37722e26325058fd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1551704
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649113}
2019-04-09 15:39:18 +00:00
Carlos Knippschild
ab192b8cf9 Reland: Deprecate mojo::DataPipe
This is the first step in eliminating mojo::DataPipe. Marking it as
deprecated with a comment and adding a DLOG (that only logs once per
process launch) will hopefully stop it from being used in new code.

Previous change was reverted due to log spam.

Bug: 944990
Change-Id: I492f7ac2038db31ce4af6a31a0b1a80570c46aef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1544798
Auto-Submit: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#648821}
2019-04-08 20:02:38 +00:00
John Budorick
72219565e9 android: use generic wrapper generation for test runner scripts.
Bug: 816629
Change-Id: I0f2674fa2d4e68bbe6d25175feceb6cd44750fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1324377
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#648189}
2019-04-05 15:41:28 +00:00
Alex Ilin
5929abe36c Fix presubmit check for base::SharedMemory
The format of the presubmit list requires a leading slash if a string should be
interpreted as a regexp.

Bug: 945971
Change-Id: I80cf57ce47beabd17603db9ba6af39c5dc2698e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1549263
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#647332}
2019-04-03 17:09:34 +00:00
Peter Wen
22bc3ec1ab Android: Remove build/secondary
Move the build targets to //third_party/android_sdk.
Move files for android_platform into //third_party/android_platform.

Tbr for build target renaming.

Tbr: thakis@chromium.org
Bug: 947060
Change-Id: I1ec7117b042a2bfe22c6dbc7985256465318cab7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1543468
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#645538}
2019-03-28 22:18:02 +00:00
Alex Ilin
63058f6ca7 base: Deprecate base::SharedMemory and base::SharedMemoryHandle
This CL deprecates base::SharedMemory(|Handle) in favor of
{Writable,ReadOnly}SharedMemoryRegion.

Deprecation comments and a presumbit warning are added.

Bug: 795291
Change-Id: Ib861e88937df93b3c3477da6a17d5689da0b0d76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1543639
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#645446}
2019-03-28 19:29:45 +00:00
Daniel Bratell
609102be0f More checks in presubmit for usage of banned C++ features
To avoid banned functions and features in C++ from being used
accidentally, add more presubmit checks.

This tests most of what is currently banned from C++11/14 except
for threads and thread_local. Those were excluded because
of a difficulty in expressing when they were ok and when not
and because of too many false positives.

This change follows a discussion on the cxx mailing list about how
to avoid that people use banned functions from pure ignorance.

Change-Id: I585c05efd72e62d2148be90a3088aa99c6279646
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539040
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#644978}
2019-03-27 20:53:21 +00:00
Daniel Bratell
69334cca32 Presubmit warning for std::to_string and error for std::shared_ptr
std::to_string is one of the banned functions but people are
not aware of that so a presubmit warning is needed.

It is only a warning for std::string since it's already used
and I don't want to trigger presubmit errors when someone
changes something on the same line as an std::to_string().

std::shared_ptr has been banned for a while (use scoped_refptr)
but it was brought to my attention because of std::weak_ptr from
C++11 which builds on std::shared_ptr.

These updates comes as most of the rest of C++11 is removed from
the ban list and only some very few functions/types remain banned. See:

https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFDHbjTfGH0wktnDryONBEEyG2O9o-CCMVWuTYFokjrSUw%40mail.gmail.com

Change-Id: I9fb1450ee76046cb842cd5a64a55d2cc977492b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535872
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#644250}
2019-03-26 11:07:45 +00:00
Matthew Denton
63ea1e63af Add fuzzer files to excluded test code in PRESUBMIT
R=dcheng@chromium.org

Change-Id: I9540571e929ea2c14643104d65ad8dc4dd901dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1538490
Auto-Submit: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643993}
2019-03-25 20:39:18 +00:00
Andrew Grieve
892bb3f17a PRESUBMIT.py: Check all .pydep files when print_python_deps.py changes
The would have caught breakage caused by recent commit :/

Bug: 930752
Change-Id: Ib82688d18c207d271dc3ff4611a6a7b05ece7418
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1532520
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642576}
2019-03-20 17:33:46 +00:00
Dirk Pranke
6d095b42d3 Use CIPD packages for GN instead of GCS.
This CL switches things so that instead of fetching GN
binaries from a Google Cloud Storage bucket, we just fetch them
directly from CIPD, which is generally faster and a bit safer.

This CL does *not* change the current version of GN we're using;
it still pulls r1496 (0790d304).

"Rolling" GN in the future will simply involve updating the revisions
in //DEPS and //buildtools/DEPS.

Bug: 855791

Change-Id: Id005250f680618206cbecaba4080933c40b23833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1519726
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641353}
2019-03-15 23:44:01 +00:00
Victor Costan
e48a2e80b3 websql: Switch blink::Platform::DatabaseOpenFile() to return base::File.
Bug: 925739
Change-Id: Ia2e1fbe637ecf6ad0a090bd3302cfea16d893e54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1525447
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641309}
2019-03-15 22:02:34 +00:00
Dirk Pranke
3c18a385ae Add presubmit checks for //buildtools/DEPS entries.
Due to limitations in how gclient works, we currently need to
duplicate entries in //DEPS and //buildtools/DEPS, and it is
possible for them to not be kept in sync. We don't want that.

This CL adds a presubmit check so that if you modify the relevant
lines in one file you are required to modify them in another.

If we ever fix the linked bug so that we don't need to duplicate
the content, we can remove these presubmit checks.

This CL also gets rid of deps_revisions.gni in //buildtools,
and switches to passing the libcxx_revision value from gclient
to GN via gclient_gn_args.

In order for this to work correctly, anyone using both
//buildtools and //build in GN will need to *also* export the
variable from their DEPS files.

Bug: 941824, 930836
Change-Id: I438c9966c497737cd4984a14cdb0c8993ffcad9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1522466
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641021}
2019-03-15 01:07:51 +00:00
Egor Pasko
56273b55e3 Reland: "Add stacktrace scripts to telemetry isolate"
The original setup failed on bots with:
  dependency_manager.exceptions.EmptyConfigError: \
    Empty config at [...]/build/android/devil_chromium.json

Add this file to the isolate as well and reland.

The reason I listed in the original revert (crrev.com/637340) was probably
incorrect. The problem was that this change became more visible on the bots by
printing a stack trace - this is being mitigated by [1] and is orthogonal to
what is being fixed here.

[1] crashpad_stackwalker: no error when crash not found
    http://crrev.com/637655

Original change's description:
> Add stacktrace scripts to telemetry isolate
>
> Add the crashpad stack walking scripts to the isolate that runs
> performance tests with Telemetry.
>
> There are multiple places where the python scripts can be inserted as
> 'data' dependencies. In the end choosing the place closest to where the
> native third_party/breakpad tools are pulled in.
>
> I checked that after the change the isolate 'performance_test_suite'
> (defined in testing/buildbot/gn_isolate_map.pyl) actually contains the
> new files. I used this command:
>
> shell> python tools/mb/mb.py isolate out/Release performance_test_suite
>
> Bug: 935979
> Reviewed-on: https://chromium-review.googlesource.com/c/1497076
> Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
> Commit-Queue: Egor Pasko <pasko@chromium.org>

Bug: 935979
Change-Id: I64867c51a3201b98647487f9c690c34ffe1ee039
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1499675
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640748}
2019-03-14 14:45:22 +00:00
Antonio Gomes
07300d0b18 Prevent further uses of DEFINE_TYPE_CASTS macro
The macro is being phased out in favor of downcast helpers
in t_p/blink/renderer/platform/casting.h. There is still a long
run to fully remove DEFINE_TYPE_CASTS, but this CL aims at
prevent new uses to take place.

CC=​jbroman@chromium.org,blink-reviews-vendor@chromium.org

BUG=891908

Change-Id: I7d981d6ff89c956e05b9cb2b5146c14934f6e836
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520978
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#640486}
2019-03-13 20:59:57 +00:00
Ian Vollick
b99472e9d4 Share strings between native and Java
Creates a script that can be used to generate Java files to
expose native strings to Java, giving us a single source of
truth for these constants.

Bug: 937280
Change-Id: I1f0804bdfff8101dfd149612acd44360ae0dc2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495747
Commit-Queue: Ian Vollick <vollick@chromium.org>
Auto-Submit: Ian Vollick <vollick@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638754}
2019-03-07 21:35:26 +00:00
Luke Zielinski
9bc14ac728 Begin importing WPT runner codebase into Chromium.
This code is used to run WPT tests in the public upstream repository,
and is being integrated into Chromium CI.

This change begins the automatic import of this code, as well as adding
several lint and presubmit check exclusions.

Bug: 937369
Change-Id: Ie9409e671b0c06a10bb509a53946687c0b7a3f65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495372
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Commit-Queue: Luke Z <lpz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637373}
2019-03-04 19:02:16 +00:00