| 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 |
| 11 namespace prerender { | 11 namespace prerender { |
| 12 | 12 |
| 13 extern const char kChromeNavigateExtraDataKey[]; | |
| 14 | |
| 15 // ID indicating that no experiment is active. | 13 // ID indicating that no experiment is active. |
| 16 const uint8 kNoExperiment = 0; | 14 const uint8 kNoExperiment = 0; |
| 17 | 15 |
| 18 // Extracts a urlencoded URL stored in a url= query parameter from a URL | 16 // Extracts a urlencoded URL stored in a url= query parameter from a URL |
| 19 // supplied, if available, and stores it in alias_url. Returns whether or not | 17 // supplied, if available, and stores it in alias_url. Returns whether or not |
| 20 // the operation succeeded (i.e. a valid URL was found). | 18 // the operation succeeded (i.e. a valid URL was found). |
| 21 bool MaybeGetQueryStringBasedAliasURL(const GURL& url, GURL* alias_url); | 19 bool MaybeGetQueryStringBasedAliasURL(const GURL& url, GURL* alias_url); |
| 22 | 20 |
| 23 // Extracts an experiment stored in the query parameter | 21 // Extracts an experiment stored in the query parameter |
| 24 // lpe= from the URL supplied, and returns it. | 22 // lpe= from the URL supplied, and returns it. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 44 | 42 |
| 45 // Report a URL was canceled due to trying to handle an external URL. | 43 // Report a URL was canceled due to trying to handle an external URL. |
| 46 void ReportPrerenderExternalURL(); | 44 void ReportPrerenderExternalURL(); |
| 47 | 45 |
| 48 // Report a URL was canceled due to unsupported prerender scheme. | 46 // Report a URL was canceled due to unsupported prerender scheme. |
| 49 void ReportUnsupportedPrerenderScheme(const GURL& url); | 47 void ReportUnsupportedPrerenderScheme(const GURL& url); |
| 50 | 48 |
| 51 } // namespace prerender | 49 } // namespace prerender |
| 52 | 50 |
| 53 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ | 51 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ |
| OLD | NEW |