OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "googleurl/src/gurl.h" |
| 10 |
| 11 namespace prerender { |
| 12 |
| 13 // ID indicating that no experiment is active. |
| 14 const uint8 kNoExperiment = 0; |
| 15 |
| 16 // Extracts a urlencoded URL stored in a url= query parameter from a URL |
| 17 // supplied, if available, and stores it in alias_url. Returns whether or not |
| 18 // the operation succeeded (i.e. a valid URL was found). |
| 19 bool MaybeGetQueryStringBasedAliasURL(const GURL& url, GURL* alias_url); |
| 20 |
| 21 // Extracts an experiment stored in the query parameter |
| 22 // lpe= from the URL supplied, and returns it. |
| 23 // Returns kNoExperiment if no experiment ID is found, or if the ID |
| 24 // is not an integer in the range 1 to 9. |
| 25 uint8 GetQueryStringBasedExperiment(const GURL& url); |
| 26 |
| 27 } // namespace prerender |
| 28 |
| 29 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ |
OLD | NEW |