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

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: Created 6 years, 1 month 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 30 matching lines...) Expand all
41 }; 41 };
42 42
43 enum DisplaySearchButtonConditions { 43 enum DisplaySearchButtonConditions {
44 DISPLAY_SEARCH_BUTTON_NEVER, 44 DISPLAY_SEARCH_BUTTON_NEVER,
45 DISPLAY_SEARCH_BUTTON_FOR_STR, // STR = Search Term Replacement 45 DISPLAY_SEARCH_BUTTON_FOR_STR, // STR = Search Term Replacement
46 DISPLAY_SEARCH_BUTTON_FOR_STR_OR_IIP, // IIP = Input In Progress 46 DISPLAY_SEARCH_BUTTON_FOR_STR_OR_IIP, // IIP = Input In Progress
47 DISPLAY_SEARCH_BUTTON_ALWAYS, 47 DISPLAY_SEARCH_BUTTON_ALWAYS,
48 DISPLAY_SEARCH_BUTTON_NUM_VALUES, 48 DISPLAY_SEARCH_BUTTON_NUM_VALUES,
49 }; 49 };
50 50
51 enum OriginChipCondition {
52 ORIGIN_CHIP_DISABLED = 0,
53 ORIGIN_CHIP_ALWAYS,
54 ORIGIN_CHIP_ON_SRP,
55 ORIGIN_CHIP_NUM_VALUES,
56 };
57
58 // Use this value for "start margin" to prevent the "es_sm" parameter from 51 // Use this value for "start margin" to prevent the "es_sm" parameter from
59 // being used. 52 // being used.
60 extern const int kDisableStartMargin; 53 extern const int kDisableStartMargin;
61 54
62 // Returns whether the suggest is enabled for the given |profile|. 55 // Returns whether the suggest is enabled for the given |profile|.
63 bool IsSuggestPrefEnabled(Profile* profile); 56 bool IsSuggestPrefEnabled(Profile* profile);
64 57
65 // Returns a string indicating whether InstantExtended is enabled, suitable 58 // Returns a string indicating whether InstantExtended is enabled, suitable
66 // for adding as a query string param to the homepage or search requests. 59 // for adding as a query string param to the homepage or search requests.
67 // Returns an empty string otherwise. 60 // Returns an empty string otherwise.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Returns the Local Instant URL of the New Tab Page. 170 // Returns the Local Instant URL of the New Tab Page.
178 // TODO(kmadhusu): Remove this function and update the call sites. 171 // TODO(kmadhusu): Remove this function and update the call sites.
179 GURL GetLocalInstantURL(Profile* profile); 172 GURL GetLocalInstantURL(Profile* profile);
180 173
181 // Returns when we should show a search button in the omnibox. This may be any 174 // Returns when we should show a search button in the omnibox. This may be any
182 // of several values, some of which depend on whether the underlying state of 175 // of several values, some of which depend on whether the underlying state of
183 // the page would normally be to perform search term replacement; see also 176 // the page would normally be to perform search term replacement; see also
184 // ToolbarModel::WouldPerformSearchTermReplacement(). 177 // ToolbarModel::WouldPerformSearchTermReplacement().
185 DisplaySearchButtonConditions GetDisplaySearchButtonConditions(); 178 DisplaySearchButtonConditions GetDisplaySearchButtonConditions();
186 179
187 // Returns true if the origin chip should be shown.
188 bool ShouldDisplayOriginChip();
189
190 // Returns a value indicating when the origin chip should be shown.
191 OriginChipCondition GetOriginChipCondition();
192
193 // Returns true if the local new tab page should show a Google logo and search 180 // Returns true if the local new tab page should show a Google logo and search
194 // box for users whose default search provider is Google, or false if not. 181 // box for users whose default search provider is Google, or false if not.
195 bool ShouldShowGoogleLocalNTP(); 182 bool ShouldShowGoogleLocalNTP();
196 183
197 // Transforms the input |url| into its "effective URL". The returned URL 184 // Transforms the input |url| into its "effective URL". The returned URL
198 // facilitates grouping process-per-site. The |url| is transformed, for 185 // facilitates grouping process-per-site. The |url| is transformed, for
199 // example, from 186 // example, from
200 // 187 //
201 // https://www.google.com/search?espv=1&q=tractors 188 // https://www.google.com/search?espv=1&q=tractors
202 // 189 //
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 240
254 // Returns true if 'use_search_path_for_instant' flag is set to true in field 241 // Returns true if 'use_search_path_for_instant' flag is set to true in field
255 // trials to use an '/search' path in an alternate Instant search base page URL 242 // trials to use an '/search' path in an alternate Instant search base page URL
256 // for prefetching search results. This allows experimentation of Instant 243 // for prefetching search results. This allows experimentation of Instant
257 // search. 244 // search.
258 bool ShouldUseSearchPathForInstant(); 245 bool ShouldUseSearchPathForInstant();
259 246
260 } // namespace chrome 247 } // namespace chrome
261 248
262 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 249 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698