Chromium Code Reviews| Index: ui/native_theme/native_theme.cc |
| diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc |
| index 21071189ed6be06fb8dbdf2417ed90609b44ad88..b9a27728dd26f2c15b981e892946570c84b03296 100644 |
| --- a/ui/native_theme/native_theme.cc |
| +++ b/ui/native_theme/native_theme.cc |
| @@ -5,8 +5,13 @@ |
| #include "ui/native_theme/native_theme.h" |
| #include "base/command_line.h" |
| +#include "base/metrics/field_trial.h" |
| #include "ui/base/ui_base_switches.h" |
| +// Constants for the new menu style field trial. |
| +const char kNewMenuStyleFieldTrialName[] = "NewMenuStyle"; |
| +const char kNewMenuStyleFieldTrialGroupName[] = "OldStyle"; |
| + |
| namespace ui { |
| void NativeTheme::SetScrollbarColors(unsigned inactive_color, |
| @@ -25,6 +30,12 @@ bool NativeTheme::IsNewMenuStyleEnabled() { |
| static bool enable_new_menu_style = |
| !CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kDisableNewMenuStyle); |
| + // Run experiment only if there is no kDisableNewMenuStyle flag. |
| + if (enable_new_menu_style) { |
| + enable_new_menu_style = |
|
sky
2013/03/06 22:34:21
Doesn't this mean we do the lookup each time? I th
yefimt
2013/03/06 23:11:57
Looking at other uses of FindFullName() I see that
|
| + base::FieldTrialList::FindFullName(kNewMenuStyleFieldTrialName) != |
| + kNewMenuStyleFieldTrialGroupName; |
| + } |
| return enable_new_menu_style; |
| } |