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

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

Issue 731423002: Remove OriginChip code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gyp file and bad merge Created 5 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 49
50 enum DisplaySearchButtonConditions { 50 enum DisplaySearchButtonConditions {
51 DISPLAY_SEARCH_BUTTON_NEVER, 51 DISPLAY_SEARCH_BUTTON_NEVER,
52 DISPLAY_SEARCH_BUTTON_FOR_STR, // STR = Search Term Replacement 52 DISPLAY_SEARCH_BUTTON_FOR_STR, // STR = Search Term Replacement
53 DISPLAY_SEARCH_BUTTON_FOR_STR_OR_IIP, // IIP = Input In Progress 53 DISPLAY_SEARCH_BUTTON_FOR_STR_OR_IIP, // IIP = Input In Progress
54 DISPLAY_SEARCH_BUTTON_ALWAYS, 54 DISPLAY_SEARCH_BUTTON_ALWAYS,
55 DISPLAY_SEARCH_BUTTON_NUM_VALUES, 55 DISPLAY_SEARCH_BUTTON_NUM_VALUES,
56 }; 56 };
57 57
58 enum OriginChipCondition {
59 ORIGIN_CHIP_DISABLED = 0,
60 ORIGIN_CHIP_ALWAYS,
61 ORIGIN_CHIP_ON_SRP,
62 ORIGIN_CHIP_NUM_VALUES,
63 };
64
65 // Use this value for "start margin" to prevent the "es_sm" parameter from 58 // Use this value for "start margin" to prevent the "es_sm" parameter from
66 // being used. 59 // being used.
67 extern const int kDisableStartMargin; 60 extern const int kDisableStartMargin;
68 61
69 // Returns whether the suggest is enabled for the given |profile|. 62 // Returns whether the suggest is enabled for the given |profile|.
70 bool IsSuggestPrefEnabled(Profile* profile); 63 bool IsSuggestPrefEnabled(Profile* profile);
71 64
72 // Returns a string indicating whether InstantExtended is enabled, suitable 65 // Returns a string indicating whether InstantExtended is enabled, suitable
73 // for adding as a query string param to the homepage or search requests. 66 // for adding as a query string param to the homepage or search requests.
74 // Returns an empty string otherwise. 67 // Returns an empty string otherwise.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // Returns the Local Instant URL of the New Tab Page. 177 // Returns the Local Instant URL of the New Tab Page.
185 // TODO(kmadhusu): Remove this function and update the call sites. 178 // TODO(kmadhusu): Remove this function and update the call sites.
186 GURL GetLocalInstantURL(Profile* profile); 179 GURL GetLocalInstantURL(Profile* profile);
187 180
188 // Returns when we should show a search button in the omnibox. This may be any 181 // Returns when we should show a search button in the omnibox. This may be any
189 // of several values, some of which depend on whether the underlying state of 182 // of several values, some of which depend on whether the underlying state of
190 // the page would normally be to perform search term replacement; see also 183 // the page would normally be to perform search term replacement; see also
191 // ToolbarModel::WouldPerformSearchTermReplacement(). 184 // ToolbarModel::WouldPerformSearchTermReplacement().
192 DisplaySearchButtonConditions GetDisplaySearchButtonConditions(); 185 DisplaySearchButtonConditions GetDisplaySearchButtonConditions();
193 186
194 // Returns true if the origin chip should be shown.
195 bool ShouldDisplayOriginChip();
196
197 // Returns a value indicating when the origin chip should be shown.
198 OriginChipCondition GetOriginChipCondition();
199
200 // Returns true if the local new tab page should show a Google logo and search 187 // Returns true if the local new tab page should show a Google logo and search
201 // box for users whose default search provider is Google, or false if not. 188 // box for users whose default search provider is Google, or false if not.
202 bool ShouldShowGoogleLocalNTP(); 189 bool ShouldShowGoogleLocalNTP();
203 190
204 // Transforms the input |url| into its "effective URL". The returned URL 191 // Transforms the input |url| into its "effective URL". The returned URL
205 // facilitates grouping process-per-site. The |url| is transformed, for 192 // facilitates grouping process-per-site. The |url| is transformed, for
206 // example, from 193 // example, from
207 // 194 //
208 // https://www.google.com/search?espv=1&q=tractors 195 // https://www.google.com/search?espv=1&q=tractors
209 // 196 //
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 247
261 // Returns true if 'use_search_path_for_instant' flag is set to true in field 248 // Returns true if 'use_search_path_for_instant' flag is set to true in field
262 // trials to use an '/search' path in an alternate Instant search base page URL 249 // trials to use an '/search' path in an alternate Instant search base page URL
263 // for prefetching search results. This allows experimentation of Instant 250 // for prefetching search results. This allows experimentation of Instant
264 // search. 251 // search.
265 bool ShouldUseSearchPathForInstant(); 252 bool ShouldUseSearchPathForInstant();
266 253
267 } // namespace chrome 254 } // namespace chrome
268 255
269 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 256 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698