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

Side by Side Diff: chrome/browser/omnibox/omnibox_field_trial.cc

Issue 307003002: Omnibox: HistoryQuick Provider Scoring: Boost Bookmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « chrome/browser/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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/omnibox/omnibox_field_trial.h" 5 #include "chrome/browser/omnibox/omnibox_field_trial.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string> 8 #include <string>
9 9
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 kHUPNewScoringVisitedCountHalfLifeTimeParam, 391 kHUPNewScoringVisitedCountHalfLifeTimeParam,
392 kHUPNewScoringVisitedCountScoreBucketsParam, 392 kHUPNewScoringVisitedCountScoreBucketsParam,
393 &scoring_params->visited_count_buckets); 393 &scoring_params->visited_count_buckets);
394 } 394 }
395 395
396 int OmniboxFieldTrial::HQPBookmarkValue() { 396 int OmniboxFieldTrial::HQPBookmarkValue() {
397 std::string bookmark_value_str = chrome_variations:: 397 std::string bookmark_value_str = chrome_variations::
398 GetVariationParamValue(kBundledExperimentFieldTrialName, 398 GetVariationParamValue(kBundledExperimentFieldTrialName,
399 kHQPBookmarkValueRule); 399 kHQPBookmarkValueRule);
400 if (bookmark_value_str.empty()) 400 if (bookmark_value_str.empty())
401 return 1; 401 return 10;
402 // This is a best-effort conversion; we trust the hand-crafted parameters 402 // This is a best-effort conversion; we trust the hand-crafted parameters
403 // downloaded from the server to be perfect. There's no need for handle 403 // downloaded from the server to be perfect. There's no need for handle
404 // errors smartly. 404 // errors smartly.
405 int bookmark_value; 405 int bookmark_value;
406 base::StringToInt(bookmark_value_str, &bookmark_value); 406 base::StringToInt(bookmark_value_str, &bookmark_value);
407 return bookmark_value; 407 return bookmark_value;
408 } 408 }
409 409
410 bool OmniboxFieldTrial::HQPAllowMatchInTLDValue() { 410 bool OmniboxFieldTrial::HQPAllowMatchInTLDValue() {
411 return chrome_variations::GetVariationParamValue( 411 return chrome_variations::GetVariationParamValue(
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 if (it != params.end()) 510 if (it != params.end())
511 return it->second; 511 return it->second;
512 // Fall back to the global instant extended context. 512 // Fall back to the global instant extended context.
513 it = params.find(rule + ":" + page_classification_str + ":*"); 513 it = params.find(rule + ":" + page_classification_str + ":*");
514 if (it != params.end()) 514 if (it != params.end())
515 return it->second; 515 return it->second;
516 // Look up rule in the global context. 516 // Look up rule in the global context.
517 it = params.find(rule + ":*:*"); 517 it = params.find(rule + ":*:*");
518 return (it != params.end()) ? it->second : std::string(); 518 return (it != params.end()) ? it->second : std::string();
519 } 519 }
OLDNEW
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698