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