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

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: Addressed nits 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
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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|. Does not consider 102 // Extracts and returns search terms from |url|. Does not consider
93 // IsQueryExtractionEnabled() and Instant support state of the page and does 103 // IsQueryExtractionEnabled() and Instant support state of the page and does
94 // not check for a privileged process, so most callers should use 104 // not check for a privileged process, so most callers should use
95 // GetSearchTerms() below instead. 105 // GetSearchTerms() below instead.
96 base::string16 ExtractSearchTermsFromURL(Profile* profile, const GURL& url); 106 base::string16 ExtractSearchTermsFromURL(Profile* profile, const GURL& url);
97 107
98 // Returns true if it is okay to extract search terms from |url|. |url| must 108 // Returns true if it is okay to extract search terms from |url|. |url| must
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool GetBoolValueForFlagWithDefault(const std::string& flag, 296 bool GetBoolValueForFlagWithDefault(const std::string& flag,
287 bool default_value, 297 bool default_value,
288 const FieldTrialFlags& flags); 298 const FieldTrialFlags& flags);
289 299
290 // Returns the Cacheable New Tab Page URL for the given |profile|. 300 // Returns the Cacheable New Tab Page URL for the given |profile|.
291 GURL GetNewTabPageURL(Profile* profile); 301 GURL GetNewTabPageURL(Profile* profile);
292 302
293 } // namespace chrome 303 } // namespace chrome
294 304
295 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 305 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698