Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Issue 9192024: Add a convenience typedef LazyInstance<T>::Leaky to avoid repeating T. (Closed)

Created:
8 years, 11 months ago by Ami GONE FROM CHROMIUM
Modified:
8 years, 11 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, cbentzel+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, dhollowa+watch_chromium.org, acolwell+watch_chromium.org, annacc+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing), ihf+watch_chromium.org
Visibility:
Public.

Description

Add a convenience typedef LazyInstance<T>::Leaky to avoid repeating T. Converted the first 20 or so hits for LeakyLazyInstanceTraits on codesearch to demonstrate the benefit at callsites. The real change is base/lazy_instance.h; everything else is example. BUG=none TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=118754

Patch Set 1 #

Total comments: 4

Patch Set 2 : . #

Total comments: 2

Patch Set 3 : . #

Patch Set 4 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -47 lines) Patch
M base/android/jni_android.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/debug/trace_event.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/lazy_instance.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M base/lazy_instance_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/nix/mime_util_xdg.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/threading/watchdog.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/tracked_objects.h View 1 chunk +1 line, -2 lines 0 comments Download
M base/tracked_objects.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/win/sampling_profiler.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/profiling.cc View 1 chunk +1 line, -2 lines 0 comments Download
M crypto/nss_util.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M media/base/media_log.cc View 1 chunk +1 line, -3 lines 0 comments Download
M net/base/dns_reloader.cc View 1 chunk +1 line, -2 lines 0 comments Download
M net/base/net_util.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M net/base/test_root_certs.cc View 1 chunk +1 line, -2 lines 0 comments Download
M net/base/x509_certificate.cc View 1 chunk +1 line, -2 lines 0 comments Download
M net/ocsp/nss_ocsp.cc View 1 chunk +1 line, -1 line 0 comments Download
M printing/pdf_metafile_cg_mac.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M ui/gfx/gl/gl_context.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M ui/gfx/gl/gl_surface.cc View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Ami GONE FROM CHROMIUM
This is a speculative CL. Evan: WDYT?
8 years, 11 months ago (2012-01-19 21:15:40 UTC) #1
Evan Martin
Every lazy instance we have is a singleton, with all the attendant annoying problems with ...
8 years, 11 months ago (2012-01-19 21:23:53 UTC) #2
Ami GONE FROM CHROMIUM
Are you materially less grumpy today (about this CL)? (my grumpmeter technology only asks once; ...
8 years, 11 months ago (2012-01-20 17:10:56 UTC) #3
Evan Martin
LGTM
8 years, 11 months ago (2012-01-20 17:21:53 UTC) #4
Ami GONE FROM CHROMIUM
thestig/wtc/kbr: can I get OWNERS-stamps from each of you for your resp. parts of the ...
8 years, 11 months ago (2012-01-20 17:26:43 UTC) #5
Ken Russell (switch to Gerrit)
GPU changes LGTM
8 years, 11 months ago (2012-01-20 18:15:25 UTC) #6
wtc
LGTM. I only reviewed base, crypto, and net. https://chromiumcodereview.appspot.com/9192024/diff/1/base/lazy_instance.h File base/lazy_instance.h (right): https://chromiumcodereview.appspot.com/9192024/diff/1/base/lazy_instance.h#newcode76 base/lazy_instance.h:76: // ...
8 years, 11 months ago (2012-01-21 00:51:00 UTC) #7
Ami GONE FROM CHROMIUM
https://chromiumcodereview.appspot.com/9192024/diff/1/base/lazy_instance.h File base/lazy_instance.h (right): https://chromiumcodereview.appspot.com/9192024/diff/1/base/lazy_instance.h#newcode76 base/lazy_instance.h:76: // Use LazyInstance<T>::Leaky for a less-verbose call-site typedef. On ...
8 years, 11 months ago (2012-01-21 01:22:29 UTC) #8
wtc
LGTM. Thanks. https://chromiumcodereview.appspot.com/9192024/diff/12002/base/lazy_instance.h File base/lazy_instance.h (right): https://chromiumcodereview.appspot.com/9192024/diff/12002/base/lazy_instance.h#newcode77 base/lazy_instance.h:77: // LazyInstance<MyType>::Leaky my_leaky_lazy_instance; I suggest also showing ...
8 years, 11 months ago (2012-01-21 01:47:36 UTC) #9
Ami GONE FROM CHROMIUM
https://chromiumcodereview.appspot.com/9192024/diff/12002/base/lazy_instance.h File base/lazy_instance.h (right): https://chromiumcodereview.appspot.com/9192024/diff/12002/base/lazy_instance.h#newcode77 base/lazy_instance.h:77: // LazyInstance<MyType>::Leaky my_leaky_lazy_instance; On 2012/01/21 01:47:36, wtc wrote: > ...
8 years, 11 months ago (2012-01-21 04:49:20 UTC) #10
Lei Zhang
printing/ LGTM
8 years, 11 months ago (2012-01-23 20:38:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/9192024/8002
8 years, 11 months ago (2012-01-23 20:47:41 UTC) #12
commit-bot: I haz the power
Can't apply patch for file base/win/sampling_profiler.cc. While running patch -p1 --forward --force; patching file base/win/sampling_profiler.cc ...
8 years, 11 months ago (2012-01-23 20:47:50 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/9192024/18001
8 years, 11 months ago (2012-01-23 20:53:58 UTC) #14
commit-bot: I haz the power
8 years, 11 months ago (2012-01-23 22:29:16 UTC) #15
Can't apply patch for file base/debug/trace_event.cc.
While running patch -p1 --forward --force;
patching file base/debug/trace_event.cc
Hunk #1 FAILED at 63.
1 out of 1 hunk FAILED -- saving rejects to file base/debug/trace_event.cc.rej

Powered by Google App Engine
This is Rietveld 408576698