| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Use this value for "start margin" to prevent the "es_sm" parameter from | 50 // Use this value for "start margin" to prevent the "es_sm" parameter from |
| 51 // being used. | 51 // being used. |
| 52 extern const int kDisableStartMargin; | 52 extern const int kDisableStartMargin; |
| 53 | 53 |
| 54 // Returns whether the Instant Extended API is enabled. | 54 // Returns whether the Instant Extended API is enabled. |
| 55 bool IsInstantExtendedAPIEnabled(); | 55 bool IsInstantExtendedAPIEnabled(); |
| 56 | 56 |
| 57 // Returns the value to pass to the &espv CGI parameter when loading the | 57 // Returns the value to pass to the &espv CGI parameter when loading the |
| 58 // embedded search page from the user's default search provider. Will be | 58 // embedded search page from the user's default search provider. Will be |
| 59 // 0 if the Instant Extended API is not enabled, or if the local-only Instant | 59 // 0 if the Instant Extended API is not enabled, or if the local-only Instant |
| 60 // Extended API is enabled, or if in incognito mode. | 60 // Extended API is enabled. |
| 61 uint64 EmbeddedSearchPageVersion(Profile* profile); | 61 uint64 EmbeddedSearchPageVersion(); |
| 62 | 62 |
| 63 // Returns whether query extraction is enabled. | 63 // Returns whether query extraction is enabled. |
| 64 bool IsQueryExtractionEnabled(Profile* profile); | 64 bool IsQueryExtractionEnabled(); |
| 65 | 65 |
| 66 // Returns whether the local-only version of Instant Extended API is enabled. | 66 // Returns whether the local-only version of Instant Extended API is enabled. |
| 67 bool IsLocalOnlyInstantExtendedAPIEnabled(); | 67 bool IsLocalOnlyInstantExtendedAPIEnabled(); |
| 68 | 68 |
| 69 // Extracts and returns search terms from |url|. Returns empty string if the URL | 69 // Extracts and returns search terms from |url|. Returns empty string if the URL |
| 70 // is not secure or doesn't have a search term replacement key. Does not | 70 // is not secure or doesn't have a search term replacement key. Does not |
| 71 // consider IsQueryExtractionEnabled() and does not check for a privileged | 71 // consider IsQueryExtractionEnabled() and does not check for a privileged |
| 72 // process, so most callers should use GetSearchTerms() below instead. | 72 // process, so most callers should use GetSearchTerms() below instead. |
| 73 string16 GetSearchTermsFromURL(Profile* profile, const GURL& url); | 73 string16 GetSearchTermsFromURL(Profile* profile, const GURL& url); |
| 74 | 74 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 void ResetInstantExtendedOptInStateGateForTest(); | 239 void ResetInstantExtendedOptInStateGateForTest(); |
| 240 | 240 |
| 241 // Returns true if |items_a| and |items_b| are equal. | 241 // Returns true if |items_a| and |items_b| are equal. |
| 242 bool AreMostVisitedItemsEqual( | 242 bool AreMostVisitedItemsEqual( |
| 243 const std::vector<InstantMostVisitedItem>& items_a, | 243 const std::vector<InstantMostVisitedItem>& items_a, |
| 244 const std::vector<InstantMostVisitedItem>& items_b); | 244 const std::vector<InstantMostVisitedItem>& items_b); |
| 245 | 245 |
| 246 } // namespace chrome | 246 } // namespace chrome |
| 247 | 247 |
| 248 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 248 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |