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

Unified Diff: ui/gfx/native_theme_android.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 | « no previous file | ui/gfx/native_theme_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/native_theme_android.cc
diff --git a/ui/gfx/native_theme_android.cc b/ui/gfx/native_theme_android.cc
index 23d6cbaf4739058dc6ceda63406cb0577a42ef8f..d570f5f546a727a764787f1f01736dfd70265765 100644
--- a/ui/gfx/native_theme_android.cc
+++ b/ui/gfx/native_theme_android.cc
@@ -6,6 +6,7 @@
#include <limits>
+#include "base/basictypes.h"
#include "base/logging.h"
#include "grit/gfx_resources.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
@@ -52,8 +53,7 @@ static SkColor BrightenColor(const color_utils::HSL& hsl,
// static
NativeThemeAndroid* NativeThemeAndroid::instance() {
- // The global NativeThemeAndroid instance.
- static NativeThemeAndroid s_native_theme;
+ CR_DEFINE_STATIC_LOCAL(NativeThemeAndroid, s_native_theme, ());
return &s_native_theme;
}
« no previous file with comments | « no previous file | ui/gfx/native_theme_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698