0
Commit Graph

1167 Commits

Author SHA1 Message Date
John Abd-El-Malek
dfd1edc814 Update documentation to allow owners of public APIs that are used throughout the codebase to Owners-Override changes across the source tree.
Unlike LSC which is meant for work that spans dozens of CLs, this new change is meant for one-off CLs. It's similar to google3's global approvals mechanism.

base, build, blink, content and url were chosen as an initial set because they are used in many top level directories and are frequently changing.

Also add "set noparent" to top level directories to avoid inadvertent +1s from src/OWNERS bypass owners reviews sometimes.

Change-Id: Iaa397a5e09174139af21fee34dca390de132e216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2688805
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857391}
2021-02-24 22:22:40 +00:00
Kevin McNee
2686295ef1 Remove webview test presubmit exception
webview browser tests have already been converted to modern callback
types.

Bug: 1170946
Change-Id: I2acc5bec0a60c0d0a1a201d2f503e42a6e6d8580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2718523
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857277}
2021-02-24 18:51:00 +00:00
Alan Screen
7b9cdd92e0 site isolation: Migrate callbacks from base::Bind
The APIs used:
  TextInputManagerTester::SetUpdateTextInputStateCalledCallback
  TextInputManagerTester::SetOnSelectionBoundsChangedCallback
  TextInputManagerTester::SetOnImeCompositionRangeChangedCallback
  TextInputManagerTester::SetOnTextSelectionChangedCallback
  TestInputMethodObserver::SetOnShowVirtualKeyboardIfEnabledCallback
  TextInputTestLocalFrame::SetStringForRangeCallback
all explicitly call for a RepeatingClosure in their API, so honor that
in the places they are used.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

Fixed: 1170976
Change-Id: Icd2928a07a79483b5a1066a52afaa2a6de068229
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2675464
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857008}
2021-02-24 03:43:24 +00:00
Alan Screen
de5e00a128 rlz: Migrate callbacks from base::Bind
Originally tried to use a BindOnce for this update [1] but that
erroneously slipped through CQ without complaint yet broke the builds
which use rlz. [2]

Since OmniboxEventGlobalTracker::RegisterCallback() uses a provided
callback as part of a RepeatingCallbackList, the generated callback
should really be created with BindRepeating.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://crrev.com/849405
[2] https://crbug.com/1170975#c7

Fixed: 1170975
Change-Id: I27290bd8a8958164d40fbc9faa25f9c26e100771
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2675093
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#856977}
2021-02-24 03:02:51 +00:00
Nico Weber
94da3c1ef4 buildtools: Remove libunwind from buildtools/DEPS
If your project DEPS's in buildtools and needs libunwind, edit your
toplevel DEPS file to have something like

  'libunwind_revision':    'a2cc4f8c554dedcb0c64cac5511b19c43f1f3d32',

in its `vars =` section, and an entry similar to

  'src/buildtools/third_party/libunwind/trunk':
    Var('chromium_git') +
    '/external/github.com/llvm/llvm-project/libunwind.git' + '@' +
    Var('libunwind_revision'),

in its `deps =` section. Add libunwind_revision to your autoroller
that rolls //build and //tools/clang etc.

Since libunwind is only used in Fuchsia builds and for chrome/android's
sampling profiler, it's possible that no projects other than chromium
actually need this.

This makes it possible to set up an autoroller for libunwind for chromium.

Bug: 1177288
Change-Id: I7a59f11b015acc98b65f4b87a9277a5a3028328d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2713283
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#856453}
2021-02-22 21:39:02 +00:00
Ulan Degenbaev
947043888c [gin] Replace ArrayBuffer::Private with v8::BackingStore
v8::BackingStore simplifies the lifetime management so there is no
need to install weak callbacks.

Bug: 1008840
Change-Id: I8c183c87166a2f496baef7ec2ab44346741e867d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2676542
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#852616}
2021-02-10 14:02:31 +00:00
Alex Turner
0a76b5f058 Enforce base::Bind/Callback/etc deprecation presubmit in all of media/
Following crrev.com/c/2676528, (virtually) all remaining uses of the
deprecated methods have been removed. This cl removes one last
base::Bind use and removes the remaining media/ files from the presubmit
exemption list. This will help prevent reintroduction of the deprecated
methods.

Bug: 1170511
Change-Id: Id1f8e41066759641d5d5a960b41460bd07b4f74b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2673239
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#852495}
2021-02-10 05:22:42 +00:00
Edward Lesmes
1e9fade427 PRESUBMIT.py: Use owners client to list security owners.
Replace input_api.owners_db with input_api.owners_client will
simplify migration from Depot Tools owners to Gerrit native
code-owners.
Owners client is an abstraction that provides a common
interface to both Depot Tools and Gerrit owners backends.

Added `set noparent` to SECURITY_OWNERS.
This makes it easy to list security reviewers, as it is the
same as listing OWNERS of that file.

Change-Id: I6196177e61b1ce19f23cc2645a482b29b92c081d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679444
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851861}
2021-02-08 20:31:12 +00:00
Edward Lesmes
a38464405a Reland "PRESUBMIT.py: Use owners client to check DEPS includes owners."
This is a reland of 3f7ffdc226

It should be virtual_depended_on_files instead of affected_files

Original change's description:
> PRESUBMIT.py: Use owners client to check DEPS includes owners.
>
> Replace input_api.owners_db with input_api.owners_client,
> a common interface to check owners using Depot Tools owners
> implementation and Gerrit Code-Owners plugin.
>
> Change-Id: I670c0294ad614537491c492fc53437ecd0305128
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679151
> Commit-Queue: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#851321}

Change-Id: If12d7215648ca3cb7d7d24e3665f182b99596d58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2682755
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851855}
2021-02-08 20:20:03 +00:00
Garrett Beaty
65ec95a0cb Revert "PRESUBMIT.py: Use owners client to check DEPS includes owners."
This reverts commit 3f7ffdc226.

Reason for revert: Breaks presubmit, see https://crbug.com/1175791

Original change's description:
> PRESUBMIT.py: Use owners client to check DEPS includes owners.
>
> Replace input_api.owners_db with input_api.owners_client,
> a common interface to check owners using Depot Tools owners
> implementation and Gerrit Code-Owners plugin.
>
> Change-Id: I670c0294ad614537491c492fc53437ecd0305128
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679151
> Commit-Queue: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#851321}

TBR=dpranke@google.com,ehmaldonado@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I416dd051f3725d14357a24ec4bc95d486d174cdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2682678
Reviewed-by: Garrett Beaty <gbeaty@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851739}
2021-02-08 17:16:33 +00:00
Edward Lesmes
3f7ffdc226 PRESUBMIT.py: Use owners client to check DEPS includes owners.
Replace input_api.owners_db with input_api.owners_client,
a common interface to check owners using Depot Tools owners
implementation and Gerrit Code-Owners plugin.

Change-Id: I670c0294ad614537491c492fc53437ecd0305128
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679151
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851321}
2021-02-05 22:49:44 +00:00
Ghazale Hosseinabadi
a7f329c209 Convert base::Bind to base::BindRepeating
This CL converts chrome_browser_cloud_management_controller.cc from
base::Bind to base::BindRepeating

Bug: 1172524
Change-Id: I3a60d3c12d9d2f391c570258ea1e05a17eb58b92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2676815
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dominique Fauteux-Chapleau <domfc@chromium.org>
Commit-Queue: Ghazale Hosseinabadi <ghazale@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851168}
2021-02-05 16:58:27 +00:00
Alan Screen
d7f2a76c09 profiling host: Migrate callbacks from base::Closure
Explicitly use a repeating closure for `metrics_timer_` since that is a
RepeatingTimer [1] which can have the callbacks multiple times.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/profiling_host/profiling_process_host.h;drc=894a464d64eebc565fbb3db5791dad4d69cf77d7;l=76

Fixed: 1170974
Change-Id: I5e6f87f2ef01b424746200a36f4f5aea69dfccd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2660686
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851055}
2021-02-05 10:35:14 +00:00
Alan Screen
3a58d42a7e payments: Migrate callbacks from base::Closure
The closures used in the internals of PaymentManifestParserTest are only
invoked once each and thus can be updated to explicitly be OnceClosure.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

Fixed: 1170956
Change-Id: Ie3b1896534191d518b2be2517e998c79b04845ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2658729
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851027}
2021-02-05 08:23:31 +00:00
Alan Screen
dee363fb17 portal: Migrate callbacks from base::Closure
task_manager::TaskManagerTester is used by some PortalBrowserTest tests
and that calls for a RepeatingClosure in its interface.  This is used
internally by ScopedInterceptTableModelObserver which clearly can make
repeated calls on the callback, so the portal code should indeed be an
explicit repeating closure.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

Fixed: 1170958
Change-Id: I2a9b166fb73fe39268dfbc35d5b4c42436577ea9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657768
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851002}
2021-02-05 06:32:35 +00:00
Alan Screen
bb4f166e52 recovery: Migrate callbacks from base::Bind
The PrefChangeRegistrar class only accepts repeating callbacks and
closures [1] so the usage in RecoveryInstallGlobalError should
explicitly use a repeating bind.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:components/prefs/pref_change_registrar.h;drc=d1818d350a07b828f038b2903a687ba8ec48db2f;l=43-44

Fixed: 1170957
Change-Id: I6e25eab27e2bfbf4fbea7806c91dfe45f63a97a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2659420
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850999}
2021-02-05 06:23:26 +00:00
Alan Screen
1c84cadd07 captive portal: Migrate callbacks from base::Bind
The callback used by SSLInterstitialTimerObserver is an explicit
SSLErrorHandler::TimerStartedCallback type, which is a repeating
callback type, so update the callback creation to also be repeating.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:components/security_interstitials/content/ssl_error_handler.h;drc=62ed285cc8715be55d14e614d38fdd61612a9f6b;l=72-73

Fixed: 1170953
Change-Id: I4c229153395d3e0f25fe90f7c85b27714d6c0d84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657772
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850981}
2021-02-05 05:16:34 +00:00
Alan Screen
c734cd5034 ntp tiles: Migrate callbacks from base::Closure
The stop closure in MostVisitedSitesWaiter comes from the QuitClosure()
of base::RunLoop which is only ever invoked once, to exit the loop.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

Fixed: 1170951
Change-Id: I3ef762b40d068a344c9f4db7ace734ab1bd3fc9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2660896
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850976}
2021-02-05 05:00:06 +00:00
Alan Screen
126d4db03f search: Migrate callbacks from base::Bind
The TemplateURLService [1] takes a RepeatingClosure which can be
invoked multiple times (such as user selection of updated search
provider) so update the factory to explicitly use that in
template_url_service_factory.cc.

TemplateURLService::RemoveAutoGeneratedForUrlsBetween() now explicitly
requires a RepeatingCallback (since it can repeatedly make the call
as it processes multiple URLs in a loop), so the calls to use that in
template_url_service_unittest.cc now reflect that.

The closure in TestTemplateUrlFetcher is to be run after each URL that
has completed being fetched.  Some of the tests do multiple downloads,
requiring that this be a repeating closure.

HandleRequestCallback is a repeating callback [2].  This can be
be invoked multiple times by the embedded test server for different
connections, so TemplateURLScraperTest's ScrapeWithOnSubmit test
should reflect that repeated bind usage.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:components/search_engines/template_url_service.h;drc=d1818d350a07b828f038b2903a687ba8ec48db2f;l=125
[2] https://source.chromium.org/chromium/chromium/src/+/master:net/test/embedded_test_server/embedded_test_server.h;drc=8028fd8b557c7857692a92216e052fa90516221e;l=303

Fixed: 1170965
Change-Id: I9ea3b823f45ca8acd7472e835f6fa211ab304734
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2658722
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Orin Jaworski <orinj@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850974}
2021-02-05 04:55:51 +00:00
Andrew Grieve
ded007b02e Android: Delete main_dex_list.py and negative_main_dex_globs
Legacy cruft :).

Bug: 1174352
Change-Id: Ia08d87d3d033bbe7f4075eeebb58b235fe533735
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2674243
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850728}
2021-02-04 20:50:03 +00:00
Rushan Suleymanov
4405d06ec0 Convert AndroidHistoryProviderService unit tests to use OnceCallback
Bind calls are also converted to BindOnce.

Bug: 1170948
Change-Id: I609622abe794ed1770948a57b8c5796992cc4772
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2666329
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Cr-Commit-Position: refs/heads/master@{#849683}
2021-02-02 18:42:20 +00:00
Shik Chen
e50b446da4 Revert "rlz: Migrate callbacks from base::Bind"
This reverts commit 9b0fcec571.

Reason for revert: build error

Original change's description:
> rlz: Migrate callbacks from base::Bind
>
> The `on_omnibox_search_callback_` registered with
> OmniboxEventGlobalTracker is declared as a OnceClosure, so update the
> instantiation to match with BindOnce.
>
> This is part of the base::Callback migration.
>
> Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44
>
> Fixed: 1170975
> Change-Id: I9178d143cc9cf09256b6342c0bcb15740d151b21
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2660558
> Reviewed-by: danakj <danakj@chromium.org>
> Reviewed-by: Roger Tawa <rogerta@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Alan Screen <awscreen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#849405}

TBR=rogerta@chromium.org,danakj@chromium.org,agrieve@chromium.org,awscreen@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ic5d0416e8a583199fff04e2a6b807ef0c85e02e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2666348
Reviewed-by: Shik Chen <shik@chromium.org>
Commit-Queue: Shik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849457}
2021-02-02 05:35:31 +00:00
Alan Screen
2512fec558 device identity: Migrate callbacks from base::Bind
The callback registered to observe the CrosSettings can be called
multiple times, for whenever the settings get changed, so providing a
repeating callback to the API [1] is necessary.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/chromeos/settings/cros_settings.cc;drc=894a464d64eebc565fbb3db5791dad4d69cf77d7;l=299

Fixed: 1170966
Change-Id: Idbf61b73f9d72496b49ac3e75d51f54eebbd7500
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2660683
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849416}
2021-02-02 03:29:17 +00:00
Alan Screen
9b0fcec571 rlz: Migrate callbacks from base::Bind
The `on_omnibox_search_callback_` registered with
OmniboxEventGlobalTracker is declared as a OnceClosure, so update the
instantiation to match with BindOnce.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

Fixed: 1170975
Change-Id: I9178d143cc9cf09256b6342c0bcb15740d151b21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2660558
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849405}
2021-02-02 03:08:15 +00:00
Ghazale Hosseinabadi
7d45c1981d Convert base::Closure to base::OnceClosure in websocket_browsertest.cc
Bug: 1170960
Change-Id: Ib273a0413c76b335bb49979d0e559e4e4e3e67f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2659743
Commit-Queue: Ghazale Hosseinabadi <ghazale@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849385}
2021-02-02 02:47:44 +00:00
Alan Screen
23f28b18a2 page load metrics: Migrate callbacks from base::Bind
HandleRequestCallback is a repeating callback [1].  This can be invoked
multiple times by the embedded test server for different connections,
so test LazyLoadFrameDisabledInReload should reflect that repeated bind
usage.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:net/test/embedded_test_server/embedded_test_server.h;drc=8028fd8b557c7857692a92216e052fa90516221e;l=303

Fixed: 1170954
Change-Id: I66ce776edd2c0cee870180d1f34846b4852d52b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2659977
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849337}
2021-02-02 01:50:31 +00:00
Robert Sesek
351d2d5c03 Remove from mojo::DataPipe.
All callers have been converted to to mojo::CreateDataPipe.

Bug: 944990
Change-Id: Ibbd3eeb4dbb6e5a99d4475cadf0dac1b0a8a61a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2664006
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849331}
2021-02-02 01:47:07 +00:00
Mohamed Heikal
8cd763a51a Reuse prepare_resources' generated R.txt files in java_library_impl
prepare_resources already generates R.txt files, there is no need to
generate another one in the java target itself. Reusing R.txt files
means faster build times. This cl also adds R.txt files generation to
android_generated_resources targets as well as always generates R.txt files in
prepare_resources (but now only for the current target and not for
dependencies). Improves build speed for res only changes by ~50%

Before:
gn args: target_os="android" use_goma=true android_fast_local_dev=true
target: chrome_public_apk
gn gen: 7.5s
chrome_java_nosig: 33.4s avg (33.4s, 33.4s)
chrome_java_sig: 34.7s avg (34.7s, 34.7s)
chrome_java_res: 37.8s avg (37.5s, 38.1s)
base_java_nosig: 42.9s avg (43.2s, 42.6s)
base_java_sig: 109.9s avg (110.2s, 109.5s)

After:
gn args: target_os="android" use_goma=true android_fast_local_dev=true
target: chrome_public_apk
gn gen: 7.4s
chrome_java_nosig: 33.6s avg (33.7s, 33.3s, 33.0s, 34.1s, 33.2s, 34.0s)
chrome_java_sig: 34.7s avg (35.3s, 35.0s, 34.2s, 34.8s, 33.9s, 34.8s)
chrome_java_res: 18.2s avg (17.9s, 18.4s, 17.8s, 18.5s, 18.3s, 18.4s)
base_java_nosig: 43.4s avg (43.1s, 43.9s, 42.4s, 44.1s, 43.0s, 43.9s)
base_java_sig: 109.7s avg (109.8s, 110.6s, 109.4s, 109.5s, 108.9s, 109.9s)

Bug: 1162462
Change-Id: I6bd12ac62531eeb9779b10258093d4dcbdb36f55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2664009
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849327}
2021-02-01 23:32:09 +00:00
Alexander Cooper
48ce1ee5cd [CodeHealth] Convert c/b/web_applications to modern callbacks
Updates two base::Bind( calls under chrome/browser/web_applications to
match the previously-updated callback type from their underlying
functions.

This is a code health cleanup with no anticipated behavior change.

Fixed: 1170969
Change-Id: I6b160913b12c8d4813cd17bfabc46bd437625960
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2659979
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Chase Phillips <cmp@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849271}
2021-02-01 21:44:40 +00:00
Alexander Cooper
b3f1af66d1 [CodeHealth] Update and fix base::Callback exceptions
Adds exceptions for directories/files found to contain base::Bind,
Callback, or Closure methods.

Additionally, fixes a handful of files that only had a single trivial
instance needing to be cleaned up.

Bug: 714018
Change-Id: I7a7ac5f07b7c62fff680ac6daa9e52ce490f24b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2660396
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849214}
2021-02-01 19:47:26 +00:00
Alexander Cooper
9c02acef44 [CodeHealth] Update c/b/plugins to modern callback methods
Updates base::Bind calls in PluginInfoHostImpl and PluginPrefs to match
the corresponding "Repeating" type of the underlying function being
called.

Updates PluginINfoHostImplUnittest to take a QuitClosure as a
OnceClosure to match it's usage.

Fixed: 1170970
Change-Id: Ifa23e0150587c74b16deb0141c394fb051fdd975
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657771
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849210}
2021-02-01 19:38:14 +00:00
Alexander Cooper
8d319448a4 [CodeHealth] Convert base::Bind( in chrome/browser/notifications
The methods that are being called have already been converted from
base::Callback to {Once,Repeating}, this cleans up a few base::Bind
calls to match the underlying function argument explicitly so that the
base::Bind alias can be deprecated.

This is a code health change which should not introduce any behavior
change.

Fixed: 1170952
Change-Id: Id0c023d6adb816464dfd6bf3a6c839e22a47cacb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657846
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#849205}
2021-02-01 19:27:00 +00:00
Alan Screen
5aa8ab09d5 previews: Migrate callbacks from base::Bind
The PreviewsIsEnabledCallback is explicitly a repeating callback [1] so
the bind for its creation in previews::PreviewsUIService() constructor
should reflect that.

HandleRequestCallback is similarly a repeating callback [2].  This can
be invoked multiple times by the embedded test server for different
connections, so LazyLoadBrowserTest::SetUpLazyLoadFrameTestPage()
should reflect that repeated bind usage.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:components/previews/content/previews_decider_impl.h;drc=d1818d350a07b828f038b2903a687ba8ec48db2f;l=45
[2] https://source.chromium.org/chromium/chromium/src/+/master:net/test/embedded_test_server/embedded_test_server.h;drc=8028fd8b557c7857692a92216e052fa90516221e;l=303

Fixed: 1170962
Change-Id: I012f4fd45110cdcae72ea7e415bb209cdb7d9995
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2653354
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: Michael Crouse <mcrouse@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848868}
2021-01-30 04:06:23 +00:00
Alexander Cooper
46a9271976 [CodeHealth] Ban new usages of base::CallbackList
base::Bind and base::Callback are being deprecated in favor of the
{Once,Repeating} versions, and the same goes for base::CallbackList;
this adds a new PRESUBMIT check to ban new usages of base::CallbackList,
while still allowing existing usages.

base::ClosureList is similar in that it should be disallowed, but it was
not used anywhere. As such, the alias has been removed and replaced with
a comment that it should not be re-added.

Bug: 1113007
Change-Id: I1cc60d9b60321c232352d2eb1c1f9df7a48c8c08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657022
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848795}
2021-01-30 00:00:20 +00:00
Alexander Cooper
602e6d9e16 [CodeHealth] Convert base::Bind/Callback in chrome/browser/policy
Converts base::Bind/Callback/Closure to {Once,Repeating} variants as
appropriate (with a preference for Once where possible). Most changes
were simple updates to match the underlying types with a couple of
exceptions:

cloud_policy_browsertest.cc:
  * on_policy_updated_ was Reset immediately after being run, which is
    the behavior of a OnceClosure and thus was converted

extension_policy_browsertest.cc/policy_network_browsertest.cc:
  * QuitClosure's should *really* only be OnceClosures; however, since
    CreateProfileAsync takes a RepeatingCallback, we cannot bind the
    QuitClosure to a RepeatingCallback. (CreateProfileAsync likely
    should not be a RepeatingCallback and this is tracked by
    Issue 1171905). In order to avoid making additional work in the
    future, a pointer to the RunLoop is instead bound to the callback,
    which mimics a pattern used by other tests that call
    CreateProfileAsync.

This is a code health change with no expected behavior changes.

Fixed: 1170955
Change-Id: I6a4d4337a26542af04d34b2051d03408d3d10c99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657796
Reviewed-by: Owen Min <zmin@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848787}
2021-01-29 23:55:46 +00:00
Alan Screen
aabf10bf21 resource_coordinator: Migrate callbacks from base::Callback
WindowedNotificationObserver constructor uses ConditionTestCallback
which is explicitly a repeating callback [1], since the callback can
be made multiple times - whenever the condition of interest is met.

The closure used in WaitForLoadingStateHelper is only ever invoked
once, when a RunLoop quits, so it can be a OnceClosure.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:content/public/test/test_utils.h;drc=699e1bd813aa71e101fc20a6ded0d23a277181e4;l=241-243

Fixed: 1170959
Change-Id: Ida90b5d49e2351f40c0cacd61d596da04162f0cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657835
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848786}
2021-01-29 23:54:45 +00:00
Alan Screen
d6a8b6741b search_engines: Migrate callbacks from base::Bind
The TemplateURLService constructor `dsp_change_callback` parameter
simply hadn't had the type updated in the implementation to match
the header as being repeated, so fix that discrepancy.

The PrefChangeRegistrar class only accepts repeating callbacks and
closures [1] so the usage in TemplateURLService::Init() and
DefaultSearchManager constructor should explicitly use repeating binds.

In TemplateURLService::RemoveAutoGeneratedForUrlsBetween() the callback
`url_filter` is invoked repeatedly in a loop over multiple URLs, so it
makes sense for this to be a repeating callback.

The DefaultSearchManager `change_observer_` callback can be invoked
multiple times based on user selections for a search engine [2], so the
underlying ObserverCallback should be explicitly identified as a
repeating callback.

Since the underlying ReadTask and WriteTask [3] used by
ScheduleDBTask() and ScheduleDBTaskWithResult() are both OnceCallback
then the KeywordWebDataService class binds can all be once as well to
reflect that.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

[1] https://source.chromium.org/chromium/chromium/src/+/master:components/prefs/pref_change_registrar.h;drc=d1818d350a07b828f038b2903a687ba8ec48db2f;l=43-44
[2] https://source.chromium.org/chromium/chromium/src/+/master:components/search_engines/default_search_manager.cc;drc=db9ae7941adc1d95c943accce9e0151d265fd640;l=325
[3] https://source.chromium.org/chromium/chromium/src/+/master:components/webdata/common/web_database_service.h;drc=1febd4367152c37a707817cbc25a1b88c527b6bb;l=48-50

Bug: 1007727
Change-Id: I465275119566dcb292080eb7782d7a03b5917fd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2653903
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Orin Jaworski <orinj@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848721}
2021-01-29 21:35:57 +00:00
Alan Screen
671d2173b3 prefs: Migrate callbacks from base::Closure
The stop closure in PrefStoreReadObserver comes from the QuitClosure()
of base::RunLoop which is only ever invoked once, to exit the loop [1].

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

Fixed: 1170964
Change-Id: I39fdea8d639f776874f34e8b64f3e076fb59a397
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2654049
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848697}
2021-01-29 20:52:18 +00:00
Alexander Cooper
967040425a [CodeHealth] Convert base::Bind/Closure in push_messaging
Converts instances of Base::Bind/Closure/Callback to Once/Repeating.

Most QuitClosures were converted to base::OnceClosure, to match their
usage, while most "callback_for_testing_"s were made into Repeating,
since that matched their usage. The Unsubscribe callback was only
expected to be run once by the test that set it, and thus was
converted to a OnceClosure.

This is a code health cleanup and should have no behavior change.

Fixed: 1170968
Change-Id: I44d5f9ea4827116806f604723e2478559931c36f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2654427
Reviewed-by: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848674}
2021-01-29 20:21:16 +00:00
Alexander Cooper
1607bfba1d [CodeHealth] Convert base::Bind in chrome/browser/browsing_data
base::Bind/Closure has been deprecated in favor of explicit variations:
{Once,Repeating}. This change converts one instance of a QuitClosure
being stored to a OnceClosure, and otherwise updates the base::Bind
calls to match the underlying function signatures, which were
previously updated/typedefed to RepeatingCallbacks.

This is a code health change and should not have any behavior change.

Fixed: 1170947
Change-Id: I8baa17c626e6c8cf523b49abe08f19611ea8e3df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657751
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848671}
2021-01-29 20:13:06 +00:00
Alan Screen
bf82330181 pdf_extension_test: Migrate callbacks from base::Bind
Callbacks in:
 - PDFExtensionTest.PdfAccessibilityInIframe
 - PDFExtensionTest.PdfAccessibilityInOOPIF
 - PDFExtensionHitTestTest.MouseLeave
 - PDFExtensionHitTestTest.ContextMenuCoordinates
require base::BindRepeating() as they can be fired repeatedly since
they are used in a loop for each guest.

This is part of the base::Callback migration.

Context: https://source.chromium.org/chromium/chromium/src/+/master:docs/callback.md;drc=ddc84d470a7d89255b7af81584a09d0cfb3e3cf2;l=40-44

Fixed: 1170963
Change-Id: Ie3141e197f0daee627d7e7b532a30c441ad64b35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2653945
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848670}
2021-01-29 20:11:15 +00:00
Maksim Moskvitin
fa7d47c5ba [CodeHealth] Convert c/b/extensions to use modern callback
Bug: 1152279
Change-Id: I1bd34b7f1c15232c6052203873a33c0766a042aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2653009
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
Cr-Commit-Position: refs/heads/master@{#848543}
2021-01-29 16:23:47 +00:00
Alexander Cooper
f5c0a15b46 [CodeHealth] Convert base::Bind/Closure in service_process
Converts base::Closure and subsequent base::Bind calls in
chrome/browser/service_process to the corresponding "Once" versions.
All Closures in this class were either passed to a method already taking
a OnceClosure, or Reset immediately after being Run, which matches the
usage pattern of a OnceCallback/Closure.

Fixed: 1170978
Change-Id: I73d2ca88b2040b4e241c0cff7ade09dcbcbf04a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2654314
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848162}
2021-01-28 17:45:17 +00:00
Reilly Grant
76d072d183 Enable base::Bind/Callback presubmit in //c/b/chromeos
Now that all callback types and base::Bind() calls in this directory
have been converted the presubmit tests are enabled to prevent
regressions.

Bug: 1148570
Change-Id: Iadf80e4d66735ddf2930a3daca2850e7dbba32cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2654491
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847913}
2021-01-28 01:42:30 +00:00
Alexander Cooper
4a0ef3e484 [CodeHealth] Convert base::Bind calls in chrome/browser/translate
This is a code-health cleanup with no anticipated behavior change.

Updates two tests under chrome/browser/translate to use BindRepeating
rather than Bind; the corresponding Callback type had previously been
aliased to a RepeatingCallback.

Bug: 1007635
Change-Id: I40a70099e2c30bfc54d03a77fc7c282ca647dbfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2650429
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847811}
2021-01-27 22:04:18 +00:00
Alex Cooper
01365d2ac9 [CodeHealth] Convert base::Bind/Callback in chrome/browser/win
Removes usages of base::Bind(, base::Callback, base::Closure and changes
them to the appropriate {Once,Repeating} version.  This is a code health
cleanup, and should have no behavior change.

third_party_blocking_browsertest.cc:
  * registry_key_.StartWatching converted to BindOnce to match function
  * QuitClosure member changed to OnceClosure, which matches its usage.
    Of note, the stored closure was already being moved/run

jumplist.cc:
  * Pref change callback is explicitly registered as BindRepeating, per
    the underlying type.

Remaining files converted stored QuitClosure's to OnceClosure's, which
matched their usage (as they were already being moved/run).

Fixed: 1170967
Change-Id: I4e87fdb85930e9fa6bf9f759a5fc6907351b6a29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2653716
Reviewed-by: Patrick Monette <pmonette@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847762}
2021-01-27 20:38:43 +00:00
Alexander Cooper
d2cd5ec52a [CodeHealth] convert base::Bind/Callback in renderer_context_menu
Removes and converts banned base::Bind and base::Closure calls in
chrome/browser/renderer_context_menu. This is a code health cleanup that
should have no functional change. The following changes were made:
render_view_context_menu_browsertest:
  * QuitClosure's converted to OnceClosure to reflect that they are only
  called once.
  * Two binds updated to once/repeating per the already updated function
  arg.
render_view_context_menu:
  * Two binds converted to BindRepeating per the underlying function
  being updated explicitly to repeating.

Fixed: 1170971
Change-Id: Id4e8f13361f37a456c114282f171cb29be48bdb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2651453
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847737}
2021-01-27 19:56:20 +00:00
Alexander Cooper
abb427e4a0 [CodeHealth] Convert base::Callback/Bind usage in //services
The following lingering changes were found and fixed:
AudioStreamHandler: CancellableClosure was used repeatedly, so converted
  to CancellableRepeatingClosure
ContentSecurityPolicyUnittest: Part of a test data struct, which was
  only called once, converted to OnceCallback/BindOnce
preferences/README.md: Referenced function and mechanism have been
  removed (even from components/prefs where referenced class had moved)
  so removed the outdated paragraph.


Bug: 714018
Change-Id: Ibc4d0f6d6de7535dc18d15473dee7311b6b48428
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2650626
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847379}
2021-01-26 23:16:42 +00:00
Ola Rozenfeld
355a1b4ead Upgrading reclient version to 0.19.2.
Also fixing PRESUBMIT to work on both Windows and Linux.

Bug: 1149386
Change-Id: I008a217724960a36748a31068ddc7976a965591f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2648619
Commit-Queue: Ola Rozenfeld <olaola@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#847041}
2021-01-26 03:41:57 +00:00
Alexander Cooper
d1244c5811 Update base::Callback check in top-level PRESUBMIT
Removes directories from the list which have no results when running:
`git grep -P -r 'base::(Bind\(|(Cancelable)?(Callback[<:]|Closure))'`

Additionally, fixes one directory where the only hit was in a comment.

Bug: 714018
Change-Id: I55a5f0e699b9138b875e98a0f0d1aff2d85b1f5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2648766
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847010}
2021-01-26 02:25:27 +00:00