Chromium Code Reviews| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 bool IsInstantExtendedAPIEnabled(); | 64 bool IsInstantExtendedAPIEnabled(); |
| 65 | 65 |
| 66 // Returns whether the suggest is enabled for the given |profile|. | 66 // Returns whether the suggest is enabled for the given |profile|. |
| 67 bool IsSuggestPrefEnabled(Profile* profile); | 67 bool IsSuggestPrefEnabled(Profile* profile); |
| 68 | 68 |
| 69 // Returns the value to pass to the &espv CGI parameter when loading the | 69 // Returns the value to pass to the &espv CGI parameter when loading the |
| 70 // embedded search page from the user's default search provider. Returns 0 if | 70 // embedded search page from the user's default search provider. Returns 0 if |
| 71 // the Instant Extended API is not enabled. | 71 // the Instant Extended API is not enabled. |
| 72 uint64 EmbeddedSearchPageVersion(); | 72 uint64 EmbeddedSearchPageVersion(); |
| 73 | 73 |
| 74 // Returns a string indicating whether InstantExtended is enabled, suitable | |
| 75 // for adding as a query string param to the homepage or search requests. | |
| 76 // | |
| 77 // |for_search| is set to true for search requests and this | |
|
samarth
2014/02/05 21:16:16
|for_search| should be set to true for search requ
kmadhusu
2014/02/05 21:59:40
Done.
| |
| 78 // function returns an empty string when the query extraction is disabled. | |
| 79 std::string InstantExtendedEnabledParam(bool for_search); | |
| 80 | |
| 74 // Returns whether query extraction is enabled. | 81 // Returns whether query extraction is enabled. |
| 75 bool IsQueryExtractionEnabled(); | 82 bool IsQueryExtractionEnabled(); |
| 76 | 83 |
| 77 // Extracts and returns search terms from |url|. Returns empty string if the URL | 84 // Extracts and returns search terms from |url|. Returns empty string if the URL |
| 78 // is not secure or doesn't have a search term replacement key. Does not | 85 // is not secure or doesn't have a search term replacement key. Does not |
| 79 // consider IsQueryExtractionEnabled() and Instant support state of the page and | 86 // consider IsQueryExtractionEnabled() and Instant support state of the page and |
| 80 // does not check for a privileged process, so most callers should use | 87 // does not check for a privileged process, so most callers should use |
| 81 // GetSearchTerms() below instead. | 88 // GetSearchTerms() below instead. |
| 82 base::string16 GetSearchTermsFromURL(Profile* profile, const GURL& url); | 89 base::string16 GetSearchTermsFromURL(Profile* profile, const GURL& url); |
| 83 | 90 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 bool GetBoolValueForFlagWithDefault(const std::string& flag, | 259 bool GetBoolValueForFlagWithDefault(const std::string& flag, |
| 253 bool default_value, | 260 bool default_value, |
| 254 const FieldTrialFlags& flags); | 261 const FieldTrialFlags& flags); |
| 255 | 262 |
| 256 // Returns the Cacheable New Tab Page URL for the given |profile|. | 263 // Returns the Cacheable New Tab Page URL for the given |profile|. |
| 257 GURL GetNewTabPageURL(Profile* profile); | 264 GURL GetNewTabPageURL(Profile* profile); |
| 258 | 265 |
| 259 } // namespace chrome | 266 } // namespace chrome |
| 260 | 267 |
| 261 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 268 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |