| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Returns true if 'use_remote_ntp_on_startup' flag is enabled in field trials | 147 // Returns true if 'use_remote_ntp_on_startup' flag is enabled in field trials |
| 148 // to always show the remote NTP on browser startup. | 148 // to always show the remote NTP on browser startup. |
| 149 bool ShouldPreferRemoteNTPOnStartup(); | 149 bool ShouldPreferRemoteNTPOnStartup(); |
| 150 | 150 |
| 151 // Should the Instant NTP be preloaded if local-only InstantExtended is enabled. | 151 // Should the Instant NTP be preloaded if local-only InstantExtended is enabled. |
| 152 bool ShouldPreloadLocalOnlyNTP(); | 152 bool ShouldPreloadLocalOnlyNTP(); |
| 153 | 153 |
| 154 // Returns true if the Instant NTP should be shown and false if not. | 154 // Returns true if the Instant NTP should be shown and false if not. |
| 155 bool ShouldShowInstantNTP(); | 155 bool ShouldShowInstantNTP(); |
| 156 | 156 |
| 157 // Returns true if the recent tabs link should be shown on the local NTP in |
| 158 // field trials. |
| 159 bool ShouldShowRecentTabsOnNTP(); |
| 160 |
| 157 // Returns true if |my_url| matches |other_url|. | 161 // Returns true if |my_url| matches |other_url|. |
| 158 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url); | 162 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url); |
| 159 | 163 |
| 160 // Transforms the input |url| into its "privileged URL". The returned URL | 164 // Transforms the input |url| into its "privileged URL". The returned URL |
| 161 // facilitates grouping process-per-site. The |url| is transformed, for | 165 // facilitates grouping process-per-site. The |url| is transformed, for |
| 162 // example, from | 166 // example, from |
| 163 // | 167 // |
| 164 // https://www.google.com/search?espv=1&q=tractors | 168 // https://www.google.com/search?espv=1&q=tractors |
| 165 // | 169 // |
| 166 // to the privileged URL | 170 // to the privileged URL |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // template. Exposed for testing only. | 243 // template. Exposed for testing only. |
| 240 bool DefaultSearchProviderSupportsInstant(Profile* profile); | 244 bool DefaultSearchProviderSupportsInstant(Profile* profile); |
| 241 | 245 |
| 242 // Let tests reset the gate that prevents metrics from being sent more than | 246 // Let tests reset the gate that prevents metrics from being sent more than |
| 243 // once. | 247 // once. |
| 244 void ResetInstantExtendedOptInStateGateForTest(); | 248 void ResetInstantExtendedOptInStateGateForTest(); |
| 245 | 249 |
| 246 } // namespace chrome | 250 } // namespace chrome |
| 247 | 251 |
| 248 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 252 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |