0
Commit Graph

12 Commits

Author SHA1 Message Date
Avi Drissman
e4622aaecc Update copyright headers in base/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

An earlier version of this CL, https://crrev.com/c/3879904,
was reverted due to an issue that was resolved with
https://crrev.com/c/3881211.

No-Try: true
Bug: 1098010
Change-Id: Ibd6ffb97e66835bc299fe7b85876c3e2927b2345
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3883841
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044747}
2022-09-08 20:36:06 +00:00
Daniel Cheng
3d1108defc Revert "Update copyright headers in base/"
This reverts commit eccb7e8107.

Reason for revert: https://crbug.com/1361092

Original change's description:
> Update copyright headers in base/
>
> The methodology used to generate this CL is documented in
> https://crbug.com/1098010#c21.
>
> No-Try: true
> Bug: 1098010
> Change-Id: Icd01cc1648eab4b0550afcff2bee17076359a132
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879904
> Owners-Override: Avi Drissman <avi@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Auto-Submit: Avi Drissman <avi@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1044191}

Bug: 1098010
Change-Id: Iefdde85d3d44fabe09906cd725b39a4e0b359491
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3880811
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044252}
2022-09-07 23:42:04 +00:00
Avi Drissman
eccb7e8107 Update copyright headers in base/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c21.

No-Try: true
Bug: 1098010
Change-Id: Icd01cc1648eab4b0550afcff2bee17076359a132
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879904
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044191}
2022-09-07 21:26:21 +00:00
Benoit Lize
b82171a6b5 [base] Convert LazyInstance to std::atomic
Bug: 1194917
Change-Id: I7a723ccd5f1f697342c8dbdb93ba330c4b6fa538
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3705578
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1015327}
2022-06-17 13:37:58 +00:00
Lei Zhang
6e17434800 Fix header guards in base/ and jingle/.
Generated mechanically as follows:

git ls-files '*.h' | grep -E '^(base|jingle)/' | \
    xargs parallel cpplint.py --filter=-,+build/header_guard -- 2>&1 | \
    grep build/header_guard | tools/apply_cpplint_header_guard.py

Bug: 1200694
Change-Id: I05f0cbd12789f60556719fd9de514390fecda563
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2839332
Reviewed-by: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874561}
2021-04-21 03:57:20 +00:00
Hans Wennborg
7b5337170c Reland "Reland "Remove/replace unnecessary includes of logging.h (base/)""
This is a reland of 80b8a77ae6

Original change's description:
> Reland "Remove/replace unnecessary includes of logging.h (base/)"
>
> This is a reland of a6e9e966ab
>
> Original change's description:
> > Remove/replace unnecessary includes of logging.h (base/)
> >
> > If the file just needs the CHECK/CHECK_OP/NOTREACHED
> > macros, use the appropriate header for that instead.
> > Or if logging.h is not needed at all, remove it.
> >
> > This is both a nice cleanup (logging.h is a big header,
> > and including it unnecessarily has compile-time costs),
> > and part of the final step towards making logging.h no
> > longer include check.h and the others.
> >
> > TBR=thakis
> >
> > Bug: 1031540
> > Change-Id: Ib87efde411a3617fcebad6dae08313c20d63d0bd
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254284
> > Commit-Queue: Hans Wennborg <hans@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#780580}
>
> TBR=thakis
>
> Bug: 1031540
> Change-Id: I0ba8608458cf14c3e4bbc86eaef4c7ad136a9263
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256179
> Reviewed-by: Hans Wennborg <hans@chromium.org>
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#780795}

TBR=thakis

Bug: 1031540
Change-Id: I21fab4b969b66e02ad89a8cee6698e50934916f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2257873
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780959}
2020-06-22 20:52:27 +00:00
Findit
d2563e9cf1 Revert "Reland "Remove/replace unnecessary includes of logging.h (base/)""
This reverts commit 80b8a77ae6.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 780795 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzgwYjhhNzdhZTYzZGY1Nzk5Y2U3ZThhNDJmODRkODFiYTdmYjI5MmIM

Sample Failed Build: https://ci.chromium.org/b/8876777224041482672

Sample Failed Step: compile

Original change's description:
> Reland "Remove/replace unnecessary includes of logging.h (base/)"
> 
> This is a reland of a6e9e966ab
> 
> Original change's description:
> > Remove/replace unnecessary includes of logging.h (base/)
> >
> > If the file just needs the CHECK/CHECK_OP/NOTREACHED
> > macros, use the appropriate header for that instead.
> > Or if logging.h is not needed at all, remove it.
> >
> > This is both a nice cleanup (logging.h is a big header,
> > and including it unnecessarily has compile-time costs),
> > and part of the final step towards making logging.h no
> > longer include check.h and the others.
> >
> > TBR=thakis
> >
> > Bug: 1031540
> > Change-Id: Ib87efde411a3617fcebad6dae08313c20d63d0bd
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254284
> > Commit-Queue: Hans Wennborg <hans@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#780580}
> 
> TBR=thakis
> 
> Bug: 1031540
> Change-Id: I0ba8608458cf14c3e4bbc86eaef4c7ad136a9263
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256179
> Reviewed-by: Hans Wennborg <hans@chromium.org>
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#780795}


Change-Id: If4ea98e6078918d097faa1d464e9b27ec497766d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1031540
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256844
Cr-Commit-Position: refs/heads/master@{#780833}
2020-06-22 16:58:44 +00:00
Hans Wennborg
80b8a77ae6 Reland "Remove/replace unnecessary includes of logging.h (base/)"
This is a reland of a6e9e966ab

Original change's description:
> Remove/replace unnecessary includes of logging.h (base/)
>
> If the file just needs the CHECK/CHECK_OP/NOTREACHED
> macros, use the appropriate header for that instead.
> Or if logging.h is not needed at all, remove it.
>
> This is both a nice cleanup (logging.h is a big header,
> and including it unnecessarily has compile-time costs),
> and part of the final step towards making logging.h no
> longer include check.h and the others.
>
> TBR=thakis
>
> Bug: 1031540
> Change-Id: Ib87efde411a3617fcebad6dae08313c20d63d0bd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254284
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#780580}

TBR=thakis

Bug: 1031540
Change-Id: I0ba8608458cf14c3e4bbc86eaef4c7ad136a9263
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256179
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780795}
2020-06-22 15:47:26 +00:00
Bruce Dawson
7691d7ad07 Revert "Remove/replace unnecessary includes of logging.h (base/)"
This reverts commit a6e9e966ab.

Reason for revert: this broke the win-chrome and win64-chrome
continuous builders. For the win-chrome build this CL was one of two
on the blamelist, for win64-chrome it was the only one.

Failure is:

FAILED: obj/chrome/browser/browser/widevine_hardware_caps_win.obj
c:\b\s\w\ir\cache\goma\client\gomacc.exe ..\..\third_party\llvm-build\Release+Asserts\bin\clang-cl.e...(too long)
../../chrome/browser/media/widevine_hardware_caps_win.cc(13,3): error: use of undeclared identifier 'NOTIMPLEMENTED'
NOTIMPLEMENTED();
^
1 error generated.

Original change's description:
> Remove/replace unnecessary includes of logging.h (base/)
>
> If the file just needs the CHECK/CHECK_OP/NOTREACHED
> macros, use the appropriate header for that instead.
> Or if logging.h is not needed at all, remove it.
>
> This is both a nice cleanup (logging.h is a big header,
> and including it unnecessarily has compile-time costs),
> and part of the final step towards making logging.h no
> longer include check.h and the others.
>
> TBR=thakis
>
> Bug: 1031540
> Change-Id: Ib87efde411a3617fcebad6dae08313c20d63d0bd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254284
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#780580}

TBR=thakis@chromium.org,hans@chromium.org

Change-Id: Iea5fb95ca6e84da2668dbfa139f1dc866311d7de
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1031540
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256151
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780587}
2020-06-20 16:53:33 +00:00
Hans Wennborg
a6e9e966ab Remove/replace unnecessary includes of logging.h (base/)
If the file just needs the CHECK/CHECK_OP/NOTREACHED
macros, use the appropriate header for that instead.
Or if logging.h is not needed at all, remove it.

This is both a nice cleanup (logging.h is a big header,
and including it unnecessarily has compile-time costs),
and part of the final step towards making logging.h no
longer include check.h and the others.

TBR=thakis

Bug: 1031540
Change-Id: Ib87efde411a3617fcebad6dae08313c20d63d0bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254284
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780580}
2020-06-20 11:44:08 +00:00
Gabriel Charette
d55aad5050 Tweak GetOrCreateLazyPointer's template logic to enable more code folding.
This CL saves 27KB in chrome.dll and 5KB in chrome_child.dll.

https://chromium-review.googlesource.com/868013 had regressed size by
9KB and was caught as a performance regression. This CL should recover
this 3X.

Also removed an extra atomic operation in the simple case (used to
atomic-load for check and atomic-load again for return, now only
atomic-loads once).

Also moved GetOrCreateLazyPointer() to a subtle:: namespace (now that
calling it is tricky), also resolving recurring confusion about whether
Needs/CompleteLazyInstance() are invoked outside of it (they're
not, they're strictly helpers).

R=fdoray@chromium.org, thakis@chromium.org

Bug: 804034
Change-Id: I8de94fe742a8f9a68d4a66e0202a6fb276843af9
Reviewed-on: https://chromium-review.googlesource.com/883364
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532013}
2018-01-26 18:07:51 +00:00
Gabriel Charette
f297f018bb Make Singleton and LazyInstance use the same logic for lazy creation.
They had more or less duplicated code for a while.

Creation logic for LazyInstance was extracted to base::internal methods
a little while back for LazyTaskRunner. It can now also be used by
Singleton to avoid code duplication.

Note: because of code duplication, until this CL: Singleton still
didn't benefit from the recent priority inversion mitigation added
to LazyInstance in r527445.

Bug: 797129
Change-Id: I4cfe0d94bce282901ec2471212e38b8e298d9f81
Reviewed-on: https://chromium-review.googlesource.com/868013
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529885}
2018-01-17 20:59:07 +00:00