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

Unified Diff: ui/gfx/native_theme_win.cc

Issue 8520026: Fix statics in NativeTheme*::instance() to avoid destruction post main (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « ui/gfx/native_theme_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/native_theme_win.cc
diff --git a/ui/gfx/native_theme_win.cc b/ui/gfx/native_theme_win.cc
index 059f3bbe8f8707db0020f9dca53a5b3dd799a981..9114e354b1a8d7b3e6933938da3abb8b675b44fd 100644
--- a/ui/gfx/native_theme_win.cc
+++ b/ui/gfx/native_theme_win.cc
@@ -9,6 +9,7 @@
#include <vsstyle.h>
#include <vssym32.h>
+#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/scoped_handle.h"
#include "base/memory/scoped_ptr.h"
@@ -65,8 +66,7 @@ const NativeTheme* NativeTheme::instance() {
// static
const NativeThemeWin* NativeThemeWin::instance() {
- // The global NativeThemeWin instance.
- static const NativeThemeWin s_native_theme;
+ CR_DEFINE_STATIC_LOCAL(NativeThemeWin, s_native_theme, ());
return &s_native_theme;
}
« no previous file with comments | « ui/gfx/native_theme_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698