OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PRERENDER_PRERENDER_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Returns kNoExperiment if no experiment ID is found, or if the ID | 27 // Returns kNoExperiment if no experiment ID is found, or if the ID |
28 // is not an integer in the range 1 to 9. | 28 // is not an integer in the range 1 to 9. |
29 uint8 GetQueryStringBasedExperiment(const GURL& url); | 29 uint8 GetQueryStringBasedExperiment(const GURL& url); |
30 | 30 |
31 // Indicates whether the URL provided has a Google domain | 31 // Indicates whether the URL provided has a Google domain |
32 bool IsGoogleDomain(const GURL& url); | 32 bool IsGoogleDomain(const GURL& url); |
33 | 33 |
34 // Indicates whether the URL provided could be a Google search result page. | 34 // Indicates whether the URL provided could be a Google search result page. |
35 bool IsGoogleSearchResultURL(const GURL& url); | 35 bool IsGoogleSearchResultURL(const GURL& url); |
36 | 36 |
37 // Returns true iff the URL provided is Web URL, using the scheme http | |
38 // or https. | |
39 bool IsWebURL(const GURL& url); | |
40 | |
41 // The prerender contents of some experiments should never be swapped in | 37 // The prerender contents of some experiments should never be swapped in |
42 // by pretending to never match on the URL. This function will return true | 38 // by pretending to never match on the URL. This function will return true |
43 // iff this is the case for the experiment_id specified. | 39 // iff this is the case for the experiment_id specified. |
44 bool IsNoSwapInExperiment(uint8 experiment_id); | 40 bool IsNoSwapInExperiment(uint8 experiment_id); |
45 | 41 |
46 // The prerender contents of some experiments should behave identical to the | 42 // The prerender contents of some experiments should behave identical to the |
47 // control group, regardless of the field trial. This function will return true | 43 // control group, regardless of the field trial. This function will return true |
48 // iff this is the case for the experiment_id specified. | 44 // iff this is the case for the experiment_id specified. |
49 bool IsControlGroupExperiment(uint8 experiment_id); | 45 bool IsControlGroupExperiment(uint8 experiment_id); |
50 | 46 |
51 // Static method gathering stats about a URLRequest for which a response has | 47 // Static method gathering stats about a URLRequest for which a response has |
52 // just started. | 48 // just started. |
53 void URLRequestResponseStarted(net::URLRequest* request); | 49 void URLRequestResponseStarted(net::URLRequest* request); |
54 | 50 |
55 } // namespace prerender | 51 } // namespace prerender |
56 | 52 |
57 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ | 53 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ |
OLD | NEW |