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 // Contains constants for known URLs and portions thereof. | 5 // Contains constants for known URLs and portions thereof. |
6 | 6 |
7 #ifndef CHROME_COMMON_URL_CONSTANTS_H_ | 7 #ifndef CHROME_COMMON_URL_CONSTANTS_H_ |
8 #define CHROME_COMMON_URL_CONSTANTS_H_ | 8 #define CHROME_COMMON_URL_CONSTANTS_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include "content/common/url_constants.h" | 11 #include "content/common/url_constants.h" |
12 | 12 |
13 class GURL; | |
14 | |
13 namespace chrome { | 15 namespace chrome { |
14 | 16 |
15 // Null terminated list of schemes that are savable. | 17 // Null terminated list of schemes that are savable. |
16 extern const char* kSavableSchemes[]; | 18 extern const char* kSavableSchemes[]; |
17 | 19 |
18 // About URLs (including schemes). | 20 // About URLs (including schemes). |
19 extern const char kAboutAboutURL[]; | 21 extern const char kAboutAboutURL[]; |
20 extern const char kAboutAppCacheInternalsURL[]; | 22 extern const char kAboutAppCacheInternalsURL[]; |
21 extern const char kAboutBrowserCrash[]; | 23 extern const char kAboutBrowserCrash[]; |
22 extern const char kAboutConflicts[]; | 24 extern const char kAboutConflicts[]; |
(...skipping 15 matching lines...) Expand all Loading... | |
38 extern const char kAboutSyncURL[]; | 40 extern const char kAboutSyncURL[]; |
39 extern const char kAboutSyncInternalsURL[]; | 41 extern const char kAboutSyncInternalsURL[]; |
40 extern const char kAboutTermsURL[]; | 42 extern const char kAboutTermsURL[]; |
41 extern const char kAboutVersionURL[]; | 43 extern const char kAboutVersionURL[]; |
42 | 44 |
43 // chrome: URLs (including schemes). Should be kept in sync with the | 45 // chrome: URLs (including schemes). Should be kept in sync with the |
44 // components below. | 46 // components below. |
45 extern const char kChromeUIAboutAboutURL[]; | 47 extern const char kChromeUIAboutAboutURL[]; |
46 extern const char kChromeUIAboutCreditsURL[]; | 48 extern const char kChromeUIAboutCreditsURL[]; |
47 extern const char kChromeUIAboutURL[]; | 49 extern const char kChromeUIAboutURL[]; |
48 extern const char kChromeUIAppLauncherURL[]; | |
49 extern const char kChromeUIBookmarksURL[]; | 50 extern const char kChromeUIBookmarksURL[]; |
50 extern const char kChromeUIBugReportURL[]; | 51 extern const char kChromeUIBugReportURL[]; |
51 extern const char kChromeUIConflictsURL[]; | 52 extern const char kChromeUIConflictsURL[]; |
52 extern const char kChromeUIConstrainedHTMLTestURL[]; | 53 extern const char kChromeUIConstrainedHTMLTestURL[]; |
53 extern const char kChromeUICrashesURL[]; | 54 extern const char kChromeUICrashesURL[]; |
54 extern const char kChromeUIDevToolsURL[]; | 55 extern const char kChromeUIDevToolsURL[]; |
55 extern const char kChromeUIDownloadsURL[]; | 56 extern const char kChromeUIDownloadsURL[]; |
56 extern const char kChromeUIExtensionIconURL[]; | 57 extern const char kChromeUIExtensionIconURL[]; |
57 extern const char kChromeUIExtensionsURL[]; | 58 extern const char kChromeUIExtensionsURL[]; |
58 extern const char kChromeUIFlagsURL[]; | 59 extern const char kChromeUIFlagsURL[]; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 // The URL for the "Learn more" page for the outdated plugin infobar. | 213 // The URL for the "Learn more" page for the outdated plugin infobar. |
213 extern const char kOutdatedPluginLearnMoreURL[]; | 214 extern const char kOutdatedPluginLearnMoreURL[]; |
214 | 215 |
215 // The URL for the "Learn more" page for the blocked plugin infobar. | 216 // The URL for the "Learn more" page for the blocked plugin infobar. |
216 extern const char kBlockedPluginLearnMoreURL[]; | 217 extern const char kBlockedPluginLearnMoreURL[]; |
217 | 218 |
218 // Call near the beginning of startup to register Chrome's internal URLs that | 219 // Call near the beginning of startup to register Chrome's internal URLs that |
219 // should be parsed as "standard" with the googleurl library. | 220 // should be parsed as "standard" with the googleurl library. |
220 void RegisterChromeSchemes(); | 221 void RegisterChromeSchemes(); |
221 | 222 |
223 // Returns true if |url| has a chrome: or about: scheme and matching |host|. | |
224 // The url may contain a path under the host. | |
225 bool IsChromeURL(const GURL& url, const char* host); | |
Evan Stade
2011/05/23 20:41:17
can we call this ChromeURLEquals or something? IsC
msw
2011/05/24 03:27:39
Done.
| |
226 | |
222 } // namespace chrome | 227 } // namespace chrome |
223 | 228 |
224 #endif // CHROME_COMMON_URL_CONSTANTS_H_ | 229 #endif // CHROME_COMMON_URL_CONSTANTS_H_ |
OLD | NEW |