| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SEARCH_SEARCH_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_SEARCH_H_ |
| 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ | 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, | 226 uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, |
| 227 uint64 default_value, | 227 uint64 default_value, |
| 228 const FieldTrialFlags& flags); | 228 const FieldTrialFlags& flags); |
| 229 | 229 |
| 230 // Given a FieldTrialFlags object, returns the bool value of the provided flag. | 230 // Given a FieldTrialFlags object, returns the bool value of the provided flag. |
| 231 // Exposed for testing only. | 231 // Exposed for testing only. |
| 232 bool GetBoolValueForFlagWithDefault(const std::string& flag, | 232 bool GetBoolValueForFlagWithDefault(const std::string& flag, |
| 233 bool default_value, | 233 bool default_value, |
| 234 const FieldTrialFlags& flags); | 234 const FieldTrialFlags& flags); |
| 235 | 235 |
| 236 // Coerces the commandline Instant URL to look like a template URL, so that we | |
| 237 // can extract search terms from it. Exposed for testing only. | |
| 238 GURL CoerceCommandLineURLToTemplateURL(const GURL& instant_url, | |
| 239 const TemplateURLRef& ref, | |
| 240 int start_margin); | |
| 241 | |
| 242 // Returns whether the default search provider has a valid Instant URL in its | 236 // Returns whether the default search provider has a valid Instant URL in its |
| 243 // template. Exposed for testing only. | 237 // template. Exposed for testing only. |
| 244 bool DefaultSearchProviderSupportsInstant(Profile* profile); | 238 bool DefaultSearchProviderSupportsInstant(Profile* profile); |
| 245 | 239 |
| 246 // Let tests reset the gate that prevents metrics from being sent more than | 240 // Let tests reset the gate that prevents metrics from being sent more than |
| 247 // once. | 241 // once. |
| 248 void ResetInstantExtendedOptInStateGateForTest(); | 242 void ResetInstantExtendedOptInStateGateForTest(); |
| 249 | 243 |
| 250 } // namespace chrome | 244 } // namespace chrome |
| 251 | 245 |
| 252 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 246 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |