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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // If the input is already a privileged URL then that same URL is returned. | 161 // If the input is already a privileged URL then that same URL is returned. |
162 GURL GetPrivilegedURLForInstant(const GURL& url, Profile* profile); | 162 GURL GetPrivilegedURLForInstant(const GURL& url, Profile* profile); |
163 | 163 |
164 // Returns true if the input |url| is a privileged Instant URL. | 164 // Returns true if the input |url| is a privileged Instant URL. |
165 bool IsPrivilegedURLForInstant(const GURL& url); | 165 bool IsPrivilegedURLForInstant(const GURL& url); |
166 | 166 |
167 // Returns the staleness timeout (in seconds) that should be used to refresh the | 167 // Returns the staleness timeout (in seconds) that should be used to refresh the |
168 // InstantLoader. | 168 // InstantLoader. |
169 int GetInstantLoaderStalenessTimeoutSec(); | 169 int GetInstantLoaderStalenessTimeoutSec(); |
170 | 170 |
171 // Returns true if |contents| corresponds to an Instant overlay. | |
172 bool IsInstantOverlay(const content::WebContents* contents); | |
173 | |
174 // Returns true if |contents| corresponds to a preloaded instant extended NTP. | 171 // Returns true if |contents| corresponds to a preloaded instant extended NTP. |
175 bool IsPreloadedInstantExtendedNTP(const content::WebContents* contents); | 172 bool IsPreloadedInstantExtendedNTP(const content::WebContents* contents); |
176 | 173 |
177 // ----------------------------------------------------- | 174 // ----------------------------------------------------- |
178 // The following APIs are exposed for use in tests only. | 175 // The following APIs are exposed for use in tests only. |
179 // ----------------------------------------------------- | 176 // ----------------------------------------------------- |
180 | 177 |
181 // Forces the Instant Extended API to be enabled for tests. | 178 // Forces the Instant Extended API to be enabled for tests. |
182 void EnableInstantExtendedAPIForTesting(); | 179 void EnableInstantExtendedAPIForTesting(); |
183 | 180 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // template. Exposed for testing only. | 219 // template. Exposed for testing only. |
223 bool DefaultSearchProviderSupportsInstant(Profile* profile); | 220 bool DefaultSearchProviderSupportsInstant(Profile* profile); |
224 | 221 |
225 // Let tests reset the gate that prevents metrics from being sent more than | 222 // Let tests reset the gate that prevents metrics from being sent more than |
226 // once. | 223 // once. |
227 void ResetInstantExtendedOptInStateGateForTest(); | 224 void ResetInstantExtendedOptInStateGateForTest(); |
228 | 225 |
229 } // namespace chrome | 226 } // namespace chrome |
230 | 227 |
231 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 228 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
OLD | NEW |