0
Commit Graph

13 Commits

Author SHA1 Message Date
Xiyuan Xia
406bc1ef72 Revert "Reland "CHECK on duplicate AddObserver() calls in ObserverList""
This reverts commit 41b2b7a997.

Reason for revert:
Causing top 3 crashes of ChromeOS M112 dev. See associated bugs.

Original change's description:
> Reland "CHECK on duplicate AddObserver() calls in ObserverList"
>
> This is a reland of commit 5d8d0d2168
>
> Remove the failing test. See patchset 1..2.
>
> Original change's description:
> > CHECK on duplicate AddObserver() calls in ObserverList
> >
> > There're observed crashes because of duplicate AddObserver() calls. See
> > crbug.com/1410397#c2. This may lead to obscure bugs if not captured,
> > therefore replace NOTREACHED with a CHECK so that it will always crash
> > on release builds.
> >
> > Bug: None
> > Change-Id: I23053675d33d2d6fc9cb2ecc7d083f03b6ec60c0
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4197957
> > Reviewed-by: Peter Boström <pbos@chromium.org>
> > Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
> > Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1097657}
>
> Bug: None
> Change-Id: I88e819cc101cadc5e24f9780e2fa686a883c1297
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4197922
> Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
> Owners-Override: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Dominic Battré <battre@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1097919}

Bug: chromium:1418060, b:270154290, b:270155382, b:270169601
Change-Id: I1b8a34a37f9bd9ce2cfc7c0371270e9b25a5e05e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4273997
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Dominic Battré <battre@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Reviewed-by: Keren Zhu <kerenzhu@chromium.org>
Auto-Submit: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1108196}
2023-02-22 07:32:22 +00:00
Keren Zhu
41b2b7a997 Reland "CHECK on duplicate AddObserver() calls in ObserverList"
This is a reland of commit 5d8d0d2168

Remove the failing test. See patchset 1..2.

Original change's description:
> CHECK on duplicate AddObserver() calls in ObserverList
>
> There're observed crashes because of duplicate AddObserver() calls. See
> crbug.com/1410397#c2. This may lead to obscure bugs if not captured,
> therefore replace NOTREACHED with a CHECK so that it will always crash
> on release builds.
>
> Bug: None
> Change-Id: I23053675d33d2d6fc9cb2ecc7d083f03b6ec60c0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4197957
> Reviewed-by: Peter Boström <pbos@chromium.org>
> Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1097657}

Bug: None
Change-Id: I88e819cc101cadc5e24f9780e2fa686a883c1297
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4197922
Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1097919}
2023-01-27 15:55:11 +00:00
Avi Drissman
12be03159f Update header includes for /base/functional in /components
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I3179c6b5879e1e2d5a5f4990484b9a85f8548809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4152595
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091229}
2023-01-11 09:16:09 +00:00
Avi Drissman
8ba1bad80d Update copyright headers in components/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: If6a3370b0b2849d889ce797596fe1ccbad2f3fe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891619
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046502}
2022-09-13 19:22:36 +00:00
jdoerrie
3feb1854e1 [clang-tidy] Apply modernize-use-auto in /components
This change applies clang-tidy's modernize-use-auto [1] in /components.
This change does not rewrite new and cast expressions.

Reproduction steps:
- run clang-tidy's modernize-use-auto
- run git cl format
- manually remove unused typedefs due to -Wunused-local-typedef error

[1] https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html

This CL was uploaded by git cl split.

R=jochen@chromium.org

Bug: 890902
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: Ibbb775036736e0b07c6ce5393569ed40878b5c62
Reviewed-on: https://chromium-review.googlesource.com/c/1257852
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597078}
2018-10-05 12:16:44 +00:00
tzik
2bcf8e420f Apply base_bind_rewriters to //components to update base::Bind to base::BindOnce
This CL applies a refactoring tool at //tools/clang/base_bind_rewriters
to //components, that updates base::Bind to base::BindOnce where the
resulting Callback is immediately converted to OnceCallback.

This reduces the number of base::Bind in //components by 921 (from 2749 to 1828).

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ia07c5b2987e113efcdeccab8f5b4ec290779d128
Reviewed-on: https://chromium-review.googlesource.com/1151035
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579367}
2018-07-31 11:22:15 +00:00
Daniel Cheng
67848525e5 Chrome style plugin: enable virtual specifier checks for Gmock objects in //components
Previously, the plugin completely skipped virtual specifier checks on
Gmock objects since it wasn't smart enough to filter out warnings caused
by Gmock macros. In preparation for making the plugin smarter, this CL
fixes existing virtual specifier warnings in //components.

R=blundell@chromium.org

Bug: 837148
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: I14f72dd481c02acdc8ea35d58d9fb4801140d353
Reviewed-on: https://chromium-review.googlesource.com/1031090
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554524}
2018-04-27 22:04:41 +00:00
dcheng
018341c1b4 Remove usage of base::ObserverList<T>::Iter::GetNext() in //components/prefs.
Observer lists now support range-based for loops.

BUG=655021

Review-Url: https://codereview.chromium.org/2415793002
Cr-Commit-Position: refs/heads/master@{#425480}
2016-10-14 21:55:41 +00:00
avi
a92d13b827 Remove stl_util's STLDeleteContainerPairSecondPointers from prefs.
BUG=555865

Review-Url: https://codereview.chromium.org/2352703003
Cr-Commit-Position: refs/heads/master@{#420002}
2016-09-21 07:50:12 +00:00
brettw
f00b9b402a Update components for new prefs location.
This is a search-and-replace update for includes with "base/prefs" ->
"components/prefs" and the headers re-sorted.

DEPS files were updated to allow the components in question to depend on
components/prefs.

This should be a no-op from a build perspective.

BUG=583034

Review URL: https://codereview.chromium.org/1651203002

Cr-Commit-Position: refs/heads/master@{#372780}
2016-02-01 22:12:35 +00:00
brettw
58cd1f1293 Move base/prefs to components/prefs
This change is the minimal move change. It does not update namespaces or includes. Forwarding headers and targets exist to map to the new location. The namespaces, include guards, and references to these files will be updated in follow-ups.

The GYP build has been updated to point to the new location because the forwarding headers generated a .gyp file cycle. Avoiding a cycle with libaddressinput is why prefs is a separate .gyp from most of the rest of the components. The GN build uses forwarding targets to keep the change smaller.

The json pref store unit tests had to be updated because of the way that they used histograms conflicted with the hsitogram setup of the components unittests. Fortunately, there's a HistogramTester helper for this case, so this patch uses it in for the moved test in place of manually checking histogram counts.

json_pref_store_unittests.cc also depended on the files il base/test/data/prefs. Rather than worry about updating all the isolates and such, this just adds the data inline and avoids having separate test files.

Reland of http://crrev.com/1648403002 with iOS fix
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1653693002

Cr-Commit-Position: refs/heads/master@{#372536}
2016-01-30 05:57:05 +00:00
joedow
b48cea969c Revert of Move base/prefs to components/prefs (patchset id:120001 of https://codereview.chromium.org/1648403002/ )
Reason for revert:
Reverting due to failure on iOS builder:
https://build.chromium.org/p/chromium.mac/builders/iOS_Device_%28ninja%29/builds/38425/steps/steps/logs/stdio

Original issue's description:
> Move base/prefs to components/prefs
>
> This change is the minimal move change. It does not update namespaces or includes. Forwarding headers and targets exist to map to the new location. The namespaces, include guards, and references to these files will be updated in follow-ups.
>
> The GYP build has been updated to point to the new location because the forwarding headers generated a .gyp file cycle. Avoiding a cycle with libaddressinput is why prefs is a separate .gyp from most of the rest of the components. The GN build uses forwarding targets to keep the change smaller.
>
> The json pref store unit tests had to be updated because of the way that they used histograms conflicted with the hsitogram setup of the components unittests. Fortunately, there's a HistogramTester helper for this case, so this patch uses it in for the moved test in place of manually checking histogram counts.
>
> json_pref_store_unittests.cc also depended on the files il base/test/data/prefs. Rather than worry about updating all the isolates and such, this just adds the data inline and avoids having separate test files.
>
> BUG=
>
> Committed: https://crrev.com/deb824cd36c02a93854537d70e1853cb9f1c55b9
> Cr-Commit-Position: refs/heads/master@{#372494}

TBR=jam@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1645073005

Cr-Commit-Position: refs/heads/master@{#372499}
2016-01-30 00:59:29 +00:00
brettw
deb824cd36 Move base/prefs to components/prefs
This change is the minimal move change. It does not update namespaces or includes. Forwarding headers and targets exist to map to the new location. The namespaces, include guards, and references to these files will be updated in follow-ups.

The GYP build has been updated to point to the new location because the forwarding headers generated a .gyp file cycle. Avoiding a cycle with libaddressinput is why prefs is a separate .gyp from most of the rest of the components. The GN build uses forwarding targets to keep the change smaller.

The json pref store unit tests had to be updated because of the way that they used histograms conflicted with the hsitogram setup of the components unittests. Fortunately, there's a HistogramTester helper for this case, so this patch uses it in for the moved test in place of manually checking histogram counts.

json_pref_store_unittests.cc also depended on the files il base/test/data/prefs. Rather than worry about updating all the isolates and such, this just adds the data inline and avoids having separate test files.

BUG=

Review URL: https://codereview.chromium.org/1648403002

Cr-Commit-Position: refs/heads/master@{#372494}
2016-01-30 00:39:01 +00:00