Now unconditionally including some directory trees to capture imports that differ based on python version (at least those that have come up so far).
BUG=589318, 599692
Review URL: https://codereview.chromium.org/1846103005
Cr-Commit-Position: refs/heads/master@{#384907}
The bot has been removed from the memory FYI waterfall.
BUG=593920
Review URL: https://codereview.chromium.org/1844493002
Cr-Commit-Position: refs/heads/master@{#384106}
Now with check disabled for non-android checkouts.
This is required for any test that uses an .isolate to push files to the
device (e.g. base_unittests).
BUG=589318
Review URL: https://codereview.chromium.org/1840113002
Cr-Commit-Position: refs/heads/master@{#384039}
This is required for any test that uses an .isolate to push files to the
device (e.g. base_unittests).
BUG=589318
Review URL: https://codereview.chromium.org/1784373002
Cr-Commit-Position: refs/heads/master@{#383127}
This renames the macro to be more standard and express its intent and
relationship to DISALLOW_COPY_AND_ASSIGN. It renames the macro to
DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND, as it does what
the old DISALLOW_COPY_AND_ASSIGN does, but also whitelists the type
for Bind/Callback to try move it.
R=Nico
TBR=sky
BUG=561749
Review URL: https://codereview.chromium.org/1501793003
Cr-Commit-Position: refs/heads/master@{#363712}
This adds additional domains to the root PRESUBMIT check,
"_CheckHardcodedGoogleHostsInLowerLayers", based on hostnames
currently used in Chromium.
Previously, this check only validated that "google.com" was not
hard-coded, but did not catch other common hostnames:
- gstatic.com
- googleapis.com
- googlezip.net
- googledrive.com
- appspot.com
Note that this check is non-blocking, only prompting the user
with a warning before continuing the submit operation.
BUG=164568
TEST=PRESUBMIT_test.py
Review URL: https://codereview.chromium.org/1403673003
Cr-Commit-Position: refs/heads/master@{#359869}
This is to ensure that log tags are not elided when retrieving
logcat output from crash reports. The log function has been
modified to make the transition easier and avoid specifying
the prefix everywhere.
This patch also moves some eliding testing from instrumentation
tests to junit tests, and adds a test to ensure that the new
tag format is not elided.
BUG=533072
Review URL: https://codereview.chromium.org/1354723004
Cr-Commit-Position: refs/heads/master@{#349733}
The crash component cannot be used on iOS (as it depends on //content).
Turn it into a layered component so that it is possible to put shared
code related to crash there (components/crash_keys and objc_zombie.{h,mm}).
BUG=522955
TBR=sky@chromium.orgTBR=jschuh@chromium.org
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/1315303004
Cr-Commit-Position: refs/heads/master@{#349643}
The crash component cannot be used on iOS (as it depends on //content).
Turn it into a layered component so that it is possible to put shared
code related to crash there (components/crash_keys and objc_zombie.{h,mm}).
BUG=522955
TBR=sky@chromium.orgTBR=jschuh@chromium.org
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/1315303004
Cr-Commit-Position: refs/heads/master@{#349384}
Public APIs from base should live inside base:: so moved Singleton class
and structs to base{} and fixed consumers.
also fixed:
** Presubmit ERRORS **
Found Singleton<T> in the following header files.
Please move them to an appropriate source file so that the template
gets instantiated in a single compilation unit.
chrome/browser/plugins/plugin_finder.h \
chromecast/media/base/media_message_loop.h \
content/browser/media/android/media_drm_credential_manager.h
Presubmit warnings:
src/chrome/browser/extensions/warning_badge_service_factory.h:5:
#ifndef header guard has wrong style, please use:
CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_
[build/header_guard] [5]
src/chrome/browser/extensions/warning_badge_service_factory.h:39:
#endif line should be "#endif //
CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_"
[build/header_guard] [5]
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/1308823002
Cr-Commit-Position: refs/heads/master@{#348136}
The presubmit check stop warning about Log calls from classes in the
org.chromium.base package.
Also does some refactoring to simplify logging related checks
BUG=498171
Review URL: https://codereview.chromium.org/1183493002
Cr-Commit-Position: refs/heads/master@{#334135}
This is to avoid static initializers that would make the code slower.
See the linked bug for discussion.
This patch deprecates Log#makeTag(String) and adds presubmit checks
to enforce at submit time what makeTag was trying to do: length and
naming rules
BUG=485772
Review URL: https://codereview.chromium.org/1131903007
Cr-Commit-Position: refs/heads/master@{#333710}
The new check warns for new log usages that don't use base.Log
The documentation is added in-tree as a markdown file
BUG=472152
Review URL: https://codereview.chromium.org/1114593002
Cr-Commit-Position: refs/heads/master@{#327504}
Presubmit does not contain any tests for the _CheckUserActionUpdate
function. This commit adds a test to check against an action in
actions.xml and one that is not found there. To do this we have to
improve the MockInputApi and MockFile classes.
BUG=462814
Review URL: https://codereview.chromium.org/966703003
Cr-Commit-Position: refs/heads/master@{#318759}
PRESUBMIT.py used to contain a handwritten list of bots to trigger on
`git cl try`. It was always out of sync with what the cq did.
https://codereview.chromium.org/823823002 awesomely made `git cl try` do
the same thing as the commit queue, but it kept a few special-case rules around.
It's better to not have these special cases: Once the developer hits cq, all
the "intelligently" skipped bots need to be run anyways. More importantly,
there should be only one system to decide what to run and it should be
identical for cq and `git cl try`. Currently, we think this system is the
`analyze` step, and it does a decent job of that already.
BUG=none (but made possible by 443613)
Review URL: https://codereview.chromium.org/921323003
Cr-Commit-Position: refs/heads/master@{#317597}
Add a presubmit check that warns about declaring Singleton<T> in header files
(except for base/memory/singleton.h)
This check is copied from presubmit_canned_checks.py in depot_tools/ with an
added exception for base/memory/singleton.h.
The corresponding code will be removed from presubmit_canned_checks.py afterwards.
BUG=349861
Review URL: https://codereview.chromium.org/933253002
Cr-Commit-Position: refs/heads/master@{#316852}
Reason for revert:
Reverting because of presubmit crashes:
Traceback (most recent call last):
File "/usr/local/google/ssd/depot_tools/git_cl.py", line 2983, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/google/ssd/depot_tools/git_cl.py", line 2969, in main
return dispatcher.execute(OptionParser(), argv)
File "/usr/local/google/ssd/depot_tools/subcommand.py", line 245, in execute
return command(parser, args[1:])
File "/usr/local/google/ssd/depot_tools/git_cl.py", line 1614, in CMDpresubmit
change=cl.GetChange(base_branch, None))
File "/usr/local/google/ssd/depot_tools/git_cl.py", line 936, in RunHook
rietveld_obj=self.RpcServer())
File "/usr/local/google/ssd/depot_tools/presubmit_support.py", line 1396, in DoPresubmitChecks
results += executer.ExecPresubmitScript(presubmit_script, filename)
File "/usr/local/google/ssd/depot_tools/presubmit_support.py", line 1313, in ExecPresubmitScript
result = eval(function_name + '(*__args)', context)
File "<string>", line 1, in <module>
File "<string>", line 1727, in CheckChangeOnCommit
File "<string>", line 1455, in _CommonChecks
File "<string>", line 1322, in _CheckSingletonInHeaders
File "/usr/local/google/ssd/depot_tools/presubmit_support.py", line 472, in ReadFile
raise IOError('Access outside the repository root is denied.')
IOError: Access outside the repository root is denied.
Original issue's description:
> Add a presubmit check that warns about declaring Singleton<T> in header files
> (except for base/memory/singleton.h)
> This check is copied from presubmit_canned_checks.py in depot_tools/ with an
> added exception for base/memory/singleton.h.
> The corresponding code will be removed from presubmit_canned_checks.py afterwards.
>
> BUG=349861
> R=phajdan.jr@chromium.org,
>
> Committed: https://crrev.com/9b73d0393037452d13358f4e2766cb62adbdede8
> Cr-Commit-Position: refs/heads/master@{#316546}
TBR=phajdan.jr@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=349861
Review URL: https://codereview.chromium.org/934723003
Cr-Commit-Position: refs/heads/master@{#316559}
(except for base/memory/singleton.h)
This check is copied from presubmit_canned_checks.py in depot_tools/ with an
added exception for base/memory/singleton.h.
The corresponding code will be removed from presubmit_canned_checks.py afterwards.
BUG=349861
R=phajdan.jr@chromium.org,
Review URL: https://codereview.chromium.org/929043002
Cr-Commit-Position: refs/heads/master@{#316546}
This CL is an iteration of http://crrev.com/766713004, that got reverted
after http://crbug.com/445265 because it could not cope correctly
with structures of the type:
<histogram_suffixes name="SafeBrowsingStores.SBWhiteLists" separator=".">
<suffix name="CSD" label="CSD"/>
<suffix name="DownloadWhitelist" label="DownloadWhitelist"/>
<affected-histogram name="SB2.DatabaseKilobytes"/>
</histogram_suffixes>
(in particular: affected-histogram-suffixes).
Limitation that should be solved now.
Original description ---------------------------------------------------
Add PRESUBMIT check if modified UMA histogram name can be found
This Presubmit checks if some diffs affect any UMA_HISTOGRAM_*
macro and, if so, checks if the histogram name is to be found
in either tools/metrics/histograms/histograms.xml or in the
CL diffs.
Addresses the problem of someone modifying code and
inadvertently forgetting a corresponding histograms.xml
adaptation, that has happened in the past.
BUG=434420, 445265
Review URL: https://codereview.chromium.org/885783007
Cr-Commit-Position: refs/heads/master@{#314557}
Reason for revert:
Produces false positive warnings on histograms using histogram_suffixes, see:
https://code.google.com/p/chromium/issues/detail?id=445265
Original issue's description:
> Add PRESUBMIT check if modified UMA histogram name can be found
>
> This Presubmit checks if some diffs affect any UMA_HISTOGRAM_*
> macro and, if so, checks if the histogram name is to be found
> in either tools/metrics/histograms/histograms.xml or in the
> CL diffs.
>
> Addresses the problem of someone modifying code and
> inadvertently forgetting a corresponding histograms.xml
> adaptation, that has happened in the past.
>
> BUG=434420
>
> Committed: https://crrev.com/2ece5270462346b1ac3bccd3bfe5e68d024b98b5
> Cr-Commit-Position: refs/heads/master@{#306388}
TBR=phajdan.jr@chromium.org,mcasas@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=434420, 445265
Review URL: https://codereview.chromium.org/841323002
Cr-Commit-Position: refs/heads/master@{#310863}
This presubmit task will catch the case when HTML files are modified with new user action and action.xml is not updated
BUG=431393
Review URL: https://codereview.chromium.org/719463003
Cr-Commit-Position: refs/heads/master@{#306842}
This Presubmit checks if some diffs affect any UMA_HISTOGRAM_*
macro and, if so, checks if the histogram name is to be found
in either tools/metrics/histograms/histograms.xml or in the
CL diffs.
Addresses the problem of someone modifying code and
inadvertently forgetting a corresponding histograms.xml
adaptation, that has happened in the past.
BUG=434420
Review URL: https://codereview.chromium.org/766713004
Cr-Commit-Position: refs/heads/master@{#306388}
Alerting the error for use to use c++11 constructs |override| and |final|
instead of OVERRIDE and FINAL respctively
BUG=417463
Review URL: https://codereview.chromium.org/653883002
Cr-Commit-Position: refs/heads/master@{#299880}
Several values are always defined and the developer actually wants to
do an #if check, not #ifdef.
BUG=417804
Review URL: https://codereview.chromium.org/595213004
Cr-Commit-Position: refs/heads/master@{#297627}
The header include order checks were running on all
affected files, including third_party for example,
this causes issues when rolling harfbuzz-ng.
BUG=404105
NOTRY=true
Review URL: https://codereview.chromium.org/462323003
Cr-Commit-Position: refs/heads/master@{#289968}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289968 0039d316-1c4b-4281-b951-d872f2087c98
Sometimes, changes to JSON/IDL files make them invalid. It's easier to check these at presubmit time than discovering they can't be parsed at runtime.
This just moves the check from chrome/common/extensions/api to top-level.
This presubmit check excludes files in test/data directories.
BUG=366395
Review URL: https://codereview.chromium.org/239283008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274432 0039d316-1c4b-4281-b951-d872f2087c98
This also fixes problems with generic trybots not being triggered
when other presubmit files which already support multiple masters
get in scope.
BUG=334892
R=maruel@chromium.org
Review URL: https://codereview.chromium.org/197963003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256698 0039d316-1c4b-4281-b951-d872f2087c98