summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gl
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-23 22:56:41 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-23 22:56:41 +0000
commit9fc441643df5e17c19133a637c1a9d1a70fbb07c (patch)
tree6c4cdb1e8c1ff0b6b132187be94e9968e2c83da1 /ui/gfx/gl
parent096b0317209cfa8ef79cbf9fb9351f00c1f60087 (diff)
downloadchromium_src-9fc441643df5e17c19133a637c1a9d1a70fbb07c.zip
chromium_src-9fc441643df5e17c19133a637c1a9d1a70fbb07c.tar.gz
chromium_src-9fc441643df5e17c19133a637c1a9d1a70fbb07c.tar.bz2
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 Review URL: https://chromiumcodereview.appspot.com/9192024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl')
-rw-r--r--ui/gfx/gl/gl_context.cc8
-rw-r--r--ui/gfx/gl/gl_surface.cc8
2 files changed, 6 insertions, 10 deletions
diff --git a/ui/gfx/gl/gl_context.cc b/ui/gfx/gl/gl_context.cc
index 199ee7d..dc94b04 100644
--- a/ui/gfx/gl/gl_context.cc
+++ b/ui/gfx/gl/gl_context.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -17,10 +17,8 @@
namespace gfx {
namespace {
-base::LazyInstance<
- base::ThreadLocalPointer<GLContext>,
- base::LeakyLazyInstanceTraits<base::ThreadLocalPointer<GLContext> > >
- current_context_ = LAZY_INSTANCE_INITIALIZER;
+base::LazyInstance<base::ThreadLocalPointer<GLContext> >::Leaky
+ current_context_ = LAZY_INSTANCE_INITIALIZER;
} // namespace
GLContext::GLContext(GLShareGroup* share_group) : share_group_(share_group) {
diff --git a/ui/gfx/gl/gl_surface.cc b/ui/gfx/gl/gl_surface.cc
index 4347185..858fb93b 100644
--- a/ui/gfx/gl/gl_surface.cc
+++ b/ui/gfx/gl/gl_surface.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -17,10 +17,8 @@
namespace gfx {
namespace {
-base::LazyInstance<
- base::ThreadLocalPointer<GLSurface>,
- base::LeakyLazyInstanceTraits<base::ThreadLocalPointer<GLSurface> > >
- current_surface_ = LAZY_INSTANCE_INITIALIZER;
+base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leaky
+ current_surface_ = LAZY_INSTANCE_INITIALIZER;
} // namespace
// static