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

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

Issue 22698002: Omnibox: Allow Bundled Omnibox Field Trial to Examine Instant Extended (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests broken after rebase Created 7 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 (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 #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ 5 #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_
6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ 6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 FRIEND_TEST_ALL_PREFIXES(OmniboxFieldTrialTest, GetValueForRuleInContext); 141 FRIEND_TEST_ALL_PREFIXES(OmniboxFieldTrialTest, GetValueForRuleInContext);
142 142
143 // The bundled omnibox experiment comes with a set of parameters 143 // The bundled omnibox experiment comes with a set of parameters
144 // (key-value pairs). Each key indicates a certain rule that applies in 144 // (key-value pairs). Each key indicates a certain rule that applies in
145 // a certain context. The value indicates what the consequences of 145 // a certain context. The value indicates what the consequences of
146 // applying the rule are. For example, the value of a SearchHistory rule 146 // applying the rule are. For example, the value of a SearchHistory rule
147 // in the context of a search results page might indicate that we should 147 // in the context of a search results page might indicate that we should
148 // prevent search history matches from inlining. 148 // prevent search history matches from inlining.
149 // 149 //
150 // This function returns the value associated with the |rule| that applies 150 // This function returns the value associated with the |rule| that applies
151 // in the current context (which currently only consists of 151 // in the current context (which currently consists of |page_classification|
152 // |page_classification| but will soon contain other features, some not 152 // and whether Instant Extended is enabled). If no such rule exists in the
153 // passed in as parameters, such as whether Instant Extended is enabled). 153 // current context, backoff to the rule in various wildcard contexts and
Peter Kasting 2013/08/09 20:45:45 Nit; backoff to the rule -> fall back to any rules
Mark P 2013/08/09 21:55:01 Changed backoff to fall back. Left the singular r
154 // If no such rule exists in the current context, looks for that rule in 154 // return its value if found. If the rule remains unfound in the global
155 // the global context and return its value if found. If the rule remains 155 // context, returns the empty string. For more details, see the
Peter Kasting 2013/08/09 20:45:45 Nit: Perhaps "For more details, including how we p
Mark P 2013/08/09 21:55:01 Done.
156 // unfound in the global context, returns the empty string. For more 156 // implementation. How to interpret the value is left to the caller; this
157 // details, see the implementation. How to interpret the value is left 157 // is rule-dependent.
158 // to the caller; this is rule-dependent.
159 static std::string GetValueForRuleInContext( 158 static std::string GetValueForRuleInContext(
160 const std::string& rule, 159 const std::string& rule,
161 AutocompleteInput::PageClassification page_classification); 160 AutocompleteInput::PageClassification page_classification);
162 161
163 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); 162 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial);
164 }; 163 };
165 164
166 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ 165 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698