Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / prerender / prerender_util.h
blob3a9ec1fd2e2f5aa8d6c4b120ed09f968ed6ccc60
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.
5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_
8 #include "base/basictypes.h"
9 #include "url/gurl.h"
11 namespace prerender {
13 // Extracts a urlencoded URL stored in a url= query parameter from a URL
14 // supplied, if available, and stores it in alias_url. Returns whether or not
15 // the operation succeeded (i.e. a valid URL was found).
16 bool MaybeGetQueryStringBasedAliasURL(const GURL& url, GURL* alias_url);
18 // Indicates whether the URL provided has a Google domain
19 bool IsGoogleDomain(const GURL& url);
21 // Indicates whether the URL provided could be a Google search result page.
22 bool IsGoogleSearchResultURL(const GURL& url);
24 // Report a URL was canceled due to trying to handle an external URL.
25 void ReportPrerenderExternalURL();
27 // Report a URL was canceled due to unsupported prerender scheme.
28 void ReportUnsupportedPrerenderScheme(const GURL& url);
30 } // namespace prerender
32 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_