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

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

Issue 393173002: Moves some functions in search.h to components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android fix 3 Created 6 years, 5 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 (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/command_line.h" 10 #include "base/command_line.h"
11 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "chrome/browser/search/search.h"
18 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/variations/variation_ids.h" 18 #include "chrome/common/variations/variation_ids.h"
20 #include "components/metrics/proto/omnibox_event.pb.h" 19 #include "components/metrics/proto/omnibox_event.pb.h"
20 #include "components/search/search.h"
21 #include "components/variations/active_field_trials.h" 21 #include "components/variations/active_field_trials.h"
22 #include "components/variations/metrics_util.h" 22 #include "components/variations/metrics_util.h"
23 #include "components/variations/variations_associated_data.h" 23 #include "components/variations/variations_associated_data.h"
24 24
25 using metrics::OmniboxEventProto; 25 using metrics::OmniboxEventProto;
26 26
27 namespace { 27 namespace {
28 28
29 typedef std::map<std::string, std::string> VariationParams; 29 typedef std::map<std::string, std::string> VariationParams;
30 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; 30 typedef HUPScoringParams::ScoreBuckets ScoreBuckets;
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (it != params.end()) 527 if (it != params.end())
528 return it->second; 528 return it->second;
529 // Fall back to the global instant extended context. 529 // Fall back to the global instant extended context.
530 it = params.find(rule + ":" + page_classification_str + ":*"); 530 it = params.find(rule + ":" + page_classification_str + ":*");
531 if (it != params.end()) 531 if (it != params.end())
532 return it->second; 532 return it->second;
533 // Look up rule in the global context. 533 // Look up rule in the global context.
534 it = params.find(rule + ":*:*"); 534 it = params.find(rule + ":*:*");
535 return (it != params.end()) ? it->second : std::string(); 535 return (it != params.end()) ? it->second : std::string();
536 } 536 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/omnibox/omnibox_field_trial_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698