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

Unified Diff: ui/views/controls/menu/menu_config_aura.cc

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NATIVE_THEME_EXPORT for mac Created 5 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/views/controls/link.cc ('k') | ui/views/controls/menu/menu_config_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_config_aura.cc
diff --git a/ui/views/controls/menu/menu_config_aura.cc b/ui/views/controls/menu/menu_config_aura.cc
index 659b304782e597e013ab69093d01a48f89ad5897..a49d44744a6ce369d6ddfec4e646193a512a9713 100644
--- a/ui/views/controls/menu/menu_config_aura.cc
+++ b/ui/views/controls/menu/menu_config_aura.cc
@@ -55,11 +55,9 @@ void MenuConfig::InitAura(const ui::NativeTheme* theme) {
#if !defined(OS_WIN)
// static
const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) {
- static MenuConfig* views_instance = NULL;
- if (!views_instance)
- views_instance = new MenuConfig(theme ?
- theme : ui::NativeTheme::instance());
- return *views_instance;
+ CR_DEFINE_STATIC_LOCAL(MenuConfig, instance,
+ (theme ? theme : ui::NativeThemeAura::instance()));
+ return instance;
}
#endif
« no previous file with comments | « ui/views/controls/link.cc ('k') | ui/views/controls/menu/menu_config_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698