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

Side by Side Diff: components/omnibox/omnibox_field_trial.cc

Issue 671593002: Do not delay most visited results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Casting fix Created 6 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 unified diff | Download patch
« no previous file with comments | « components/omnibox/omnibox_field_trial.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/omnibox/omnibox_field_trial.h" 5 #include "components/omnibox/omnibox_field_trial.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 return false; 168 return false;
169 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_LINUX) || \ 169 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_LINUX) || \
170 (defined(OS_MACOSX) && !defined(OS_IOS)) 170 (defined(OS_MACOSX) && !defined(OS_IOS))
171 return true; 171 return true;
172 #else 172 #else
173 return false; 173 return false;
174 #endif 174 #endif
175 } 175 }
176 176
177 bool OmniboxFieldTrial::InZeroSuggestMostVisitedFieldTrial() { 177 bool OmniboxFieldTrial::InZeroSuggestMostVisitedFieldTrial() {
178 return InZeroSuggestMostVisitedWithoutSerpFieldTrial() ||
179 variations::GetVariationParamValue(
180 kBundledExperimentFieldTrialName,
181 kZeroSuggestVariantRule) == "MostVisited";
182 }
183
184 bool OmniboxFieldTrial::InZeroSuggestMostVisitedWithoutSerpFieldTrial() {
178 return variations::GetVariationParamValue( 185 return variations::GetVariationParamValue(
179 kBundledExperimentFieldTrialName, 186 kBundledExperimentFieldTrialName,
180 kZeroSuggestVariantRule) == "MostVisited"; 187 kZeroSuggestVariantRule) == "MostVisitedWithoutSERP";
181 } 188 }
182 189
183 bool OmniboxFieldTrial::InZeroSuggestAfterTypingFieldTrial() { 190 bool OmniboxFieldTrial::InZeroSuggestAfterTypingFieldTrial() {
184 return variations::GetVariationParamValue( 191 return variations::GetVariationParamValue(
185 kBundledExperimentFieldTrialName, 192 kBundledExperimentFieldTrialName,
186 kZeroSuggestVariantRule) == "AfterTyping"; 193 kZeroSuggestVariantRule) == "AfterTyping";
187 } 194 }
188 195
189 bool OmniboxFieldTrial::InZeroSuggestPersonalizedFieldTrial() { 196 bool OmniboxFieldTrial::InZeroSuggestPersonalizedFieldTrial() {
190 return variations::GetVariationParamValue( 197 return variations::GetVariationParamValue(
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 if (it != params.end()) 433 if (it != params.end())
427 return it->second; 434 return it->second;
428 // Fall back to the global instant extended context. 435 // Fall back to the global instant extended context.
429 it = params.find(rule + ":" + page_classification_str + ":*"); 436 it = params.find(rule + ":" + page_classification_str + ":*");
430 if (it != params.end()) 437 if (it != params.end())
431 return it->second; 438 return it->second;
432 // Look up rule in the global context. 439 // Look up rule in the global context.
433 it = params.find(rule + ":*:*"); 440 it = params.find(rule + ":*:*");
434 return (it != params.end()) ? it->second : std::string(); 441 return (it != params.end()) ? it->second : std::string();
435 } 442 }
OLDNEW
« no previous file with comments | « components/omnibox/omnibox_field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698