| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, | 217 uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, |
| 218 uint64 default_value, | 218 uint64 default_value, |
| 219 const FieldTrialFlags& flags); | 219 const FieldTrialFlags& flags); |
| 220 | 220 |
| 221 // Given a FieldTrialFlags object, returns the bool value of the provided flag. | 221 // Given a FieldTrialFlags object, returns the bool value of the provided flag. |
| 222 // Exposed for testing only. | 222 // Exposed for testing only. |
| 223 bool GetBoolValueForFlagWithDefault(const std::string& flag, | 223 bool GetBoolValueForFlagWithDefault(const std::string& flag, |
| 224 bool default_value, | 224 bool default_value, |
| 225 const FieldTrialFlags& flags); | 225 const FieldTrialFlags& flags); |
| 226 | 226 |
| 227 // Coerces the commandline Instant URL to look like a template URL, so that we | |
| 228 // can extract search terms from it. Exposed for testing only. | |
| 229 GURL CoerceCommandLineURLToTemplateURL(const GURL& instant_url, | |
| 230 const TemplateURLRef& ref, | |
| 231 int start_margin); | |
| 232 | |
| 233 // Returns whether the default search provider has a valid Instant URL in its | 227 // Returns whether the default search provider has a valid Instant URL in its |
| 234 // template. Exposed for testing only. | 228 // template. Exposed for testing only. |
| 235 bool DefaultSearchProviderSupportsInstant(Profile* profile); | 229 bool DefaultSearchProviderSupportsInstant(Profile* profile); |
| 236 | 230 |
| 237 // Let tests reset the gate that prevents metrics from being sent more than | 231 // Let tests reset the gate that prevents metrics from being sent more than |
| 238 // once. | 232 // once. |
| 239 void ResetInstantExtendedOptInStateGateForTest(); | 233 void ResetInstantExtendedOptInStateGateForTest(); |
| 240 | 234 |
| 241 // Returns true if |items_a| and |items_b| are equal. | 235 // Returns true if |items_a| and |items_b| are equal. |
| 242 bool AreMostVisitedItemsEqual( | 236 bool AreMostVisitedItemsEqual( |
| 243 const std::vector<InstantMostVisitedItem>& items_a, | 237 const std::vector<InstantMostVisitedItem>& items_a, |
| 244 const std::vector<InstantMostVisitedItem>& items_b); | 238 const std::vector<InstantMostVisitedItem>& items_b); |
| 245 | 239 |
| 246 } // namespace chrome | 240 } // namespace chrome |
| 247 | 241 |
| 248 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 242 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |