Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: chrome/browser/search/search.h

Issue 164493005: Move SearchTermsData::ForceInstantResultsParam() to chrome::ForceInstantResultsParam(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 uint64 EmbeddedSearchPageVersion(); 79 uint64 EmbeddedSearchPageVersion();
80 80
81 // Returns a string indicating whether InstantExtended is enabled, suitable 81 // Returns a string indicating whether InstantExtended is enabled, suitable
82 // for adding as a query string param to the homepage or search requests. 82 // for adding as a query string param to the homepage or search requests.
83 // Returns an empty string otherwise. 83 // Returns an empty string otherwise.
84 // 84 //
85 // |for_search| should be set to true for search requests, in which case this 85 // |for_search| should be set to true for search requests, in which case this
86 // returns a non-empty string only if query extraction is enabled. 86 // returns a non-empty string only if query extraction is enabled.
87 std::string InstantExtendedEnabledParam(bool for_search); 87 std::string InstantExtendedEnabledParam(bool for_search);
88 88
89 // Returns a string that will cause the search results page to update
90 // incrementally. Currently, Instant Extended passes a different param to
91 // search results pages that also has this effect, so by default this function
92 // returns the empty string when Instant Extended is enabled. However, when
93 // doing instant search result prerendering, we still need to pass this param,
94 // as Instant Extended does not cause incremental updates by default for the
95 // prerender page. Callers should set |for_prerender| in this case to force
96 // the returned string to be non-empty.
97 std::string ForceInstantResultsParam(bool for_prerender);
98
89 // Returns whether query extraction is enabled. 99 // Returns whether query extraction is enabled.
90 bool IsQueryExtractionEnabled(); 100 bool IsQueryExtractionEnabled();
91 101
92 // Extracts and returns search terms from |url|. Returns empty string if the URL 102 // Extracts and returns search terms from |url|. Returns empty string if the URL
93 // is not secure or doesn't have a search term replacement key. Does not 103 // is not secure or doesn't have a search term replacement key. Does not
94 // consider IsQueryExtractionEnabled() and Instant support state of the page and 104 // consider IsQueryExtractionEnabled() and Instant support state of the page and
95 // does not check for a privileged process, so most callers should use 105 // does not check for a privileged process, so most callers should use
96 // GetSearchTerms() below instead. 106 // GetSearchTerms() below instead.
97 base::string16 GetSearchTermsFromURL(Profile* profile, const GURL& url); 107 base::string16 GetSearchTermsFromURL(Profile* profile, const GURL& url);
98 108
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 bool GetBoolValueForFlagWithDefault(const std::string& flag, 292 bool GetBoolValueForFlagWithDefault(const std::string& flag,
283 bool default_value, 293 bool default_value,
284 const FieldTrialFlags& flags); 294 const FieldTrialFlags& flags);
285 295
286 // Returns the Cacheable New Tab Page URL for the given |profile|. 296 // Returns the Cacheable New Tab Page URL for the given |profile|.
287 GURL GetNewTabPageURL(Profile* profile); 297 GURL GetNewTabPageURL(Profile* profile);
288 298
289 } // namespace chrome 299 } // namespace chrome
290 300
291 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 301 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698