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

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

Issue 485483003: Revert of Omnibox: Make URLs of Bookmarks Searchable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 kBundledExperimentFieldTrialName, 299 kBundledExperimentFieldTrialName,
300 kHQPAllowMatchInTLDRule) == "true"; 300 kHQPAllowMatchInTLDRule) == "true";
301 } 301 }
302 302
303 bool OmniboxFieldTrial::HQPAllowMatchInSchemeValue() { 303 bool OmniboxFieldTrial::HQPAllowMatchInSchemeValue() {
304 return variations::GetVariationParamValue( 304 return variations::GetVariationParamValue(
305 kBundledExperimentFieldTrialName, 305 kBundledExperimentFieldTrialName,
306 kHQPAllowMatchInSchemeRule) == "true"; 306 kHQPAllowMatchInSchemeRule) == "true";
307 } 307 }
308 308
309 bool OmniboxFieldTrial::BookmarksIndexURLsValue() {
310 return variations::GetVariationParamValue(
311 kBundledExperimentFieldTrialName,
312 kBookmarksIndexURLsRule) == "true";
313 }
314
309 bool OmniboxFieldTrial::DisableInlining() { 315 bool OmniboxFieldTrial::DisableInlining() {
310 return variations::GetVariationParamValue( 316 return variations::GetVariationParamValue(
311 kBundledExperimentFieldTrialName, 317 kBundledExperimentFieldTrialName,
312 kDisableInliningRule) == "true"; 318 kDisableInliningRule) == "true";
313 } 319 }
314 320
315 bool OmniboxFieldTrial::EnableAnswersInSuggest() { 321 bool OmniboxFieldTrial::EnableAnswersInSuggest() {
316 const CommandLine* cl = CommandLine::ForCurrentProcess(); 322 const CommandLine* cl = CommandLine::ForCurrentProcess();
317 if (cl->HasSwitch(switches::kDisableAnswersInSuggest)) 323 if (cl->HasSwitch(switches::kDisableAnswersInSuggest))
318 return false; 324 return false;
(...skipping 23 matching lines...) Expand all
342 "ShortcutsScoringMaxRelevance"; 348 "ShortcutsScoringMaxRelevance";
343 const char OmniboxFieldTrial::kSearchHistoryRule[] = "SearchHistory"; 349 const char OmniboxFieldTrial::kSearchHistoryRule[] = "SearchHistory";
344 const char OmniboxFieldTrial::kDemoteByTypeRule[] = "DemoteByType"; 350 const char OmniboxFieldTrial::kDemoteByTypeRule[] = "DemoteByType";
345 const char OmniboxFieldTrial::kHQPBookmarkValueRule[] = 351 const char OmniboxFieldTrial::kHQPBookmarkValueRule[] =
346 "HQPBookmarkValue"; 352 "HQPBookmarkValue";
347 const char OmniboxFieldTrial::kHQPAllowMatchInTLDRule[] = "HQPAllowMatchInTLD"; 353 const char OmniboxFieldTrial::kHQPAllowMatchInTLDRule[] = "HQPAllowMatchInTLD";
348 const char OmniboxFieldTrial::kHQPAllowMatchInSchemeRule[] = 354 const char OmniboxFieldTrial::kHQPAllowMatchInSchemeRule[] =
349 "HQPAllowMatchInScheme"; 355 "HQPAllowMatchInScheme";
350 const char OmniboxFieldTrial::kZeroSuggestRule[] = "ZeroSuggest"; 356 const char OmniboxFieldTrial::kZeroSuggestRule[] = "ZeroSuggest";
351 const char OmniboxFieldTrial::kZeroSuggestVariantRule[] = "ZeroSuggestVariant"; 357 const char OmniboxFieldTrial::kZeroSuggestVariantRule[] = "ZeroSuggestVariant";
358 const char OmniboxFieldTrial::kBookmarksIndexURLsRule[] = "BookmarksIndexURLs";
352 const char OmniboxFieldTrial::kDisableInliningRule[] = "DisableInlining"; 359 const char OmniboxFieldTrial::kDisableInliningRule[] = "DisableInlining";
353 const char OmniboxFieldTrial::kAnswersInSuggestRule[] = "AnswersInSuggest"; 360 const char OmniboxFieldTrial::kAnswersInSuggestRule[] = "AnswersInSuggest";
354 const char OmniboxFieldTrial::kAddUWYTMatchEvenIfPromotedURLsRule[] = 361 const char OmniboxFieldTrial::kAddUWYTMatchEvenIfPromotedURLsRule[] =
355 "AddUWYTMatchEvenIfPromotedURLs"; 362 "AddUWYTMatchEvenIfPromotedURLs";
356 const char OmniboxFieldTrial::kDisplayHintTextWhenPossibleRule[] = 363 const char OmniboxFieldTrial::kDisplayHintTextWhenPossibleRule[] =
357 "DisplayHintTextWhenPossible"; 364 "DisplayHintTextWhenPossible";
358 365
359 const char OmniboxFieldTrial::kHUPNewScoringEnabledParam[] = 366 const char OmniboxFieldTrial::kHUPNewScoringEnabledParam[] =
360 "HUPExperimentalScoringEnabled"; 367 "HUPExperimentalScoringEnabled";
361 const char OmniboxFieldTrial::kHUPNewScoringTypedCountRelevanceCapParam[] = 368 const char OmniboxFieldTrial::kHUPNewScoringTypedCountRelevanceCapParam[] =
(...skipping 64 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') | components/policy/core/browser/managed_bookmarks_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698