Index: ui/app_list/search/mixer.cc |
diff --git a/ui/app_list/search/mixer.cc b/ui/app_list/search/mixer.cc |
index 8bcd8c7e385a6fb5ff84b86f44b81d5c222ed109..3034a0d380dd38131baff074c26d44020d57fae7 100644 |
--- a/ui/app_list/search/mixer.cc |
+++ b/ui/app_list/search/mixer.cc |
@@ -10,7 +10,9 @@ |
#include <string> |
#include <vector> |
+#include "base/command_line.h" |
#include "base/metrics/field_trial.h" |
+#include "ui/app_list/app_list_switches.h" |
#include "ui/app_list/search_provider.h" |
#include "ui/app_list/search_result.h" |
@@ -43,8 +45,21 @@ void UpdateResult(const SearchResult& source, SearchResult* target) { |
// experiment on the new Mixer logic that allows results from different groups |
// to be blended together, rather than stratified. |
bool IsBlendedMixerTrialEnabled() { |
+ // Note: It's important to query the field trial state first, to ensure that |
+ // UMA reports the correct group. |
const std::string group_name = |
base::FieldTrialList::FindFullName(kAppListMixerFieldTrialName); |
+ |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableNewAppListMixer)) { |
+ return false; |
+ } |
+ |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableNewAppListMixer)) { |
+ return true; |
+ } |
+ |
return group_name == kAppListMixerFieldTrialEnabled; |
} |