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

Unified Diff: ui/app_list/search/mixer.cc

Issue 1139083002: Added flag --enable-new-app-list-mixer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@applist-mixer-priority-finch-test
Patch Set: Add histograms. Created 5 years, 7 months 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/app_list/app_list_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « ui/app_list/app_list_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698