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

Unified Diff: app/surface/io_surface_support_mac.cc

Issue 2042003: Switch some Singletons to use LeakySingleton. Base URL: http://src.chromium.org/git/chromium.git
Patch Set: More build fixes. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | app/win/window_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/surface/io_surface_support_mac.cc
diff --git a/app/surface/io_surface_support_mac.cc b/app/surface/io_surface_support_mac.cc
index fed6660253993146aa9665c2eae3516e8e2674fd..368341c8c7448b6c18a73c406fed3669d5e1b6a2 100644
--- a/app/surface/io_surface_support_mac.cc
+++ b/app/surface/io_surface_support_mac.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "app/surface/io_surface_support_mac.h"
+
#include <dlfcn.h>
+#include "base/basictypes.h"
#include "base/singleton.h"
-#include "app/surface/io_surface_support_mac.h"
typedef CFTypeRef (*IOSurfaceCreateProcPtr)(CFDictionaryRef properties);
typedef uint32 (*IOSurfaceGetIDProcPtr)(CFTypeRef io_surface);
@@ -70,13 +72,11 @@ class IOSurfaceSupportImpl : public IOSurfaceSupport {
bool initialized_successfully_;
friend struct DefaultSingletonTraits<IOSurfaceSupportImpl>;
- DISALLOW_EVIL_CONSTRUCTORS(IOSurfaceSupportImpl);
+ DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupportImpl);
};
-static Singleton<IOSurfaceSupportImpl> sole_instance_;
-
IOSurfaceSupportImpl* IOSurfaceSupportImpl::Initialize() {
- IOSurfaceSupportImpl* impl = sole_instance_.get();
+ IOSurfaceSupportImpl* impl = LeakySingleton<IOSurfaceSupportImpl>::get();
if (impl->InitializedSuccessfully())
return impl;
return NULL;
@@ -239,4 +239,3 @@ IOSurfaceSupport::IOSurfaceSupport() {
IOSurfaceSupport::~IOSurfaceSupport() {
}
-
« no previous file with comments | « no previous file | app/win/window_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698