Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/common/url_constants.cc

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update special_tabs.py from Nirnimesh's codereview.chromium.org/6995057/. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/url_constants.h ('k') | chrome/renderer/about_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/common/url_constants.h" 5 #include "chrome/common/url_constants.h"
6 6
7 #include "googleurl/src/url_util.h" 7 #include "googleurl/src/url_util.h"
8 8
9 namespace chrome { 9 namespace chrome {
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const char kAboutShorthangURL[] = "about:shorthang"; 45 const char kAboutShorthangURL[] = "about:shorthang";
46 const char kAboutSyncURL[] = "about:sync"; 46 const char kAboutSyncURL[] = "about:sync";
47 const char kAboutSyncInternalsURL[] = "about:sync-internals"; 47 const char kAboutSyncInternalsURL[] = "about:sync-internals";
48 const char kAboutTermsURL[] = "about:terms"; 48 const char kAboutTermsURL[] = "about:terms";
49 const char kAboutVersionURL[] = "about:version"; 49 const char kAboutVersionURL[] = "about:version";
50 50
51 // Use an obfuscated URL to make this nondiscoverable, we only want this 51 // Use an obfuscated URL to make this nondiscoverable, we only want this
52 // to be used for testing. 52 // to be used for testing.
53 const char kAboutBrowserCrash[] = "about:inducebrowsercrashforrealz"; 53 const char kAboutBrowserCrash[] = "about:inducebrowsercrashforrealz";
54 54
55 const char kChromeUIAboutAboutURL[] = "chrome://about/about/"; 55 const char kChromeUIAboutURL[] = "chrome://about/";
56 const char kChromeUIAboutCreditsURL[] = "chrome://about/credits/";
57 const char kChromeUIAboutURL[] = "chrome://settings/about/";
58 const char kChromeUIBookmarksURL[] = "chrome://bookmarks/"; 56 const char kChromeUIBookmarksURL[] = "chrome://bookmarks/";
59 const char kChromeUIBugReportURL[] = "chrome://bugreport/"; 57 const char kChromeUIBugReportURL[] = "chrome://bugreport/";
58 const char kChromeUICloudPrintResourcesURL[] = "chrome://cloudprintresources/";
60 const char kChromeUIConflictsURL[] = "chrome://conflicts/"; 59 const char kChromeUIConflictsURL[] = "chrome://conflicts/";
61 const char kChromeUIConstrainedHTMLTestURL[] = "chrome://constrained-test/"; 60 const char kChromeUIConstrainedHTMLTestURL[] = "chrome://constrained-test/";
62 const char kChromeUICrashesURL[] = "chrome://crashes/"; 61 const char kChromeUICrashesURL[] = "chrome://crashes/";
62 const char kChromeUICrashURL[] = "chrome://crash/";
63 const char kChromeUICreditsURL[] = "chrome://credits/";
63 const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/"; 64 const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/";
64 const char kChromeUIDownloadsURL[] = "chrome://downloads/"; 65 const char kChromeUIDownloadsURL[] = "chrome://downloads/";
65 const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/"; 66 const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/";
66 const char kChromeUIExtensionsURL[] = "chrome://extensions/"; 67 const char kChromeUIExtensionsURL[] = "chrome://extensions/";
67 const char kChromeUIFaviconURL[] = "chrome://favicon/"; 68 const char kChromeUIFaviconURL[] = "chrome://favicon/";
68 const char kChromeUIFlagsURL[] = "chrome://flags/"; 69 const char kChromeUIFlagsURL[] = "chrome://flags/";
69 const char kChromeUIFlashURL[] = "chrome://flash/"; 70 const char kChromeUIFlashURL[] = "chrome://flash/";
71 const char kChromeUIHangURL[] = "chrome://hang/";
70 const char kChromeUIHistory2URL[] = "chrome://history2/"; 72 const char kChromeUIHistory2URL[] = "chrome://history2/";
71 const char kChromeUIHistoryURL[] = "chrome://history/"; 73 const char kChromeUIHistoryURL[] = "chrome://history/";
74 const char kChromeUIIPCURL[] = "chrome://ipc/";
72 const char kChromeUIKeyboardURL[] = "chrome://keyboard/"; 75 const char kChromeUIKeyboardURL[] = "chrome://keyboard/";
76 const char kChromeUIKillURL[] = "chrome://kill/";
77 const char kChromeUIMemoryRedirectURL[] = "chrome://memory-redirect/";
78 const char kChromeUINetworkViewCacheURL[] = "chrome://view-http-cache/";
73 const char kChromeUINewTabURL[] = "chrome://newtab/"; 79 const char kChromeUINewTabURL[] = "chrome://newtab/";
74 const char kChromeUIPluginsURL[] = "chrome://plugins/"; 80 const char kChromeUIPluginsURL[] = "chrome://plugins/";
75 const char kChromeUIPrintURL[] = "chrome://print/"; 81 const char kChromeUIPrintURL[] = "chrome://print/";
76 const char kChromeUISettingsURL[] = "chrome://settings/"; 82 const char kChromeUISettingsURL[] = "chrome://settings/";
83 const char kChromeUIShorthangURL[] = "chrome://shorthang/";
77 const char kChromeUITextfieldsURL[] = "chrome://textfields/"; 84 const char kChromeUITextfieldsURL[] = "chrome://textfields/";
85 const char kChromeUIVersionURL[] = "chrome://version/";
78 86
79 #if defined(OS_CHROMEOS) 87 #if defined(OS_CHROMEOS)
80 const char kChromeUIAboutOSCreditsURL[] = "chrome://about/os-credits/";
81 const char kChromeUIActivationMessage[] = "chrome://activationmessage/"; 88 const char kChromeUIActivationMessage[] = "chrome://activationmessage/";
82 const char kChromeUIActiveDownloadsURL[] = "chrome://active-downloads/"; 89 const char kChromeUIActiveDownloadsURL[] = "chrome://active-downloads/";
83 const char kChromeUIChooseMobileNetworkURL[] = 90 const char kChromeUIChooseMobileNetworkURL[] =
84 "chrome://choose-mobile-network/"; 91 "chrome://choose-mobile-network/";
85 const char kChromeUICollectedCookiesURL[] = "chrome://collected-cookies/"; 92 const char kChromeUICollectedCookiesURL[] = "chrome://collected-cookies/";
86 const char kChromeUIHttpAuthURL[] = "chrome://http-auth/"; 93 const char kChromeUIHttpAuthURL[] = "chrome://http-auth/";
87 const char kChromeUIImageBurnerURL[] = "chrome://imageburner/"; 94 const char kChromeUIImageBurnerURL[] = "chrome://imageburner/";
88 const char kChromeUIKeyboardOverlayURL[] = "chrome://keyboardoverlay/"; 95 const char kChromeUIKeyboardOverlayURL[] = "chrome://keyboardoverlay/";
89 const char kChromeUIMediaplayerURL[] = "chrome://mediaplayer/"; 96 const char kChromeUIMediaplayerURL[] = "chrome://mediaplayer/";
90 const char kChromeUIMobileSetupURL[] = "chrome://mobilesetup/"; 97 const char kChromeUIMobileSetupURL[] = "chrome://mobilesetup/";
91 const char kChromeUIOobeURL[] = "chrome://oobe/"; 98 const char kChromeUIOobeURL[] = "chrome://oobe/";
99 const char kChromeUIOSCreditsURL[] = "chrome://os-credits/";
92 const char kChromeUIProxySettingsURL[] = "chrome://proxy-settings/"; 100 const char kChromeUIProxySettingsURL[] = "chrome://proxy-settings/";
93 const char kChromeUIRegisterPageURL[] = "chrome://register/"; 101 const char kChromeUIRegisterPageURL[] = "chrome://register/";
94 const char kChromeUISlideshowURL[] = "chrome://slideshow/"; 102 const char kChromeUISlideshowURL[] = "chrome://slideshow/";
95 const char kChromeUISimUnlockURL[] = "chrome://sim-unlock/"; 103 const char kChromeUISimUnlockURL[] = "chrome://sim-unlock/";
96 const char kChromeUISystemInfoURL[] = "chrome://system/"; 104 const char kChromeUISystemInfoURL[] = "chrome://system/";
97 const char kChromeUIUserImageURL[] = "chrome://userimage/"; 105 const char kChromeUIUserImageURL[] = "chrome://userimage/";
98 const char kChromeUIEnterpriseEnrollmentURL[] = 106 const char kChromeUIEnterpriseEnrollmentURL[] =
99 "chrome://enterprise-enrollment/"; 107 "chrome://enterprise-enrollment/";
100 #endif 108 #endif
101 109
102 // Keep this list sorted please. 110 // Keep this list sorted please.
111 const char kChromeUIAboutHost[] = "about";
112 const char kChromeUIAppCacheInternalsHost[] = "appcache-internals";
113 const char kChromeUIBlankHost[] = "blank";
114 const char kChromeUIBlobInternalsHost[] = "blob-internals";
103 const char kChromeUIBookmarksHost[] = "bookmarks"; 115 const char kChromeUIBookmarksHost[] = "bookmarks";
116 const char kChromeUIBrowserCrashHost[] = "inducebrowsercrashforrealz";
104 const char kChromeUIBugReportHost[] = "bugreport"; 117 const char kChromeUIBugReportHost[] = "bugreport";
118 const char kChromeUICacheHost[] = "cache";
119 const char kChromeUIChromeURLsHost[] = "chrome-urls";
120 const char kChromeUICloudPrintResourcesHost[] = "cloudprintresources";
121 const char kChromeUICloudPrintSetupHost[] = "cloudprintsetup";
105 const char kChromeUIConflictsHost[] = "conflicts"; 122 const char kChromeUIConflictsHost[] = "conflicts";
123 const char kChromeUIConstrainedHTMLTestHost[] = "constrained-test";
124 const char kChromeUICrashHost[] = "crash";
106 const char kChromeUICrashesHost[] = "crashes"; 125 const char kChromeUICrashesHost[] = "crashes";
126 const char kChromeUICreditsHost[] = "credits";
127 const char kChromeUIDefaultHost[] = "version";
107 const char kChromeUIDevToolsHost[] = "devtools"; 128 const char kChromeUIDevToolsHost[] = "devtools";
108 const char kChromeUIDialogHost[] = "dialog"; 129 const char kChromeUIDialogHost[] = "dialog";
130 const char kChromeUIDNSHost[] = "dns";
109 const char kChromeUIDownloadsHost[] = "downloads"; 131 const char kChromeUIDownloadsHost[] = "downloads";
110 const char kChromeUIExtensionIconHost[] = "extension-icon"; 132 const char kChromeUIExtensionIconHost[] = "extension-icon";
111 const char kChromeUIExtensionsHost[] = "extensions"; 133 const char kChromeUIExtensionsHost[] = "extensions";
112 const char kChromeUIFaviconHost[] = "favicon"; 134 const char kChromeUIFaviconHost[] = "favicon";
113 const char kChromeUITouchIconHost[] = "touch-icon";
114 const char kChromeUIFlagsHost[] = "flags"; 135 const char kChromeUIFlagsHost[] = "flags";
115 const char kChromeUIFlashHost[] = "flash"; 136 const char kChromeUIFlashHost[] = "flash";
137 const char kChromeUIGpuHost[] = "gpu";
138 const char kChromeUIGpuCleanHost[] = "gpuclean";
139 const char kChromeUIGpuCrashHost[] = "gpucrash";
140 const char kChromeUIGpuHangHost[] = "gpuhang";
116 const char kChromeUIGpuInternalsHost[] = "gpu-internals"; 141 const char kChromeUIGpuInternalsHost[] = "gpu-internals";
142 const char kChromeUIHangHost[] = "hang";
143 const char kChromeUIHistory2Host[] = "history2";
117 const char kChromeUIHistoryHost[] = "history"; 144 const char kChromeUIHistoryHost[] = "history";
118 const char kChromeUIHistory2Host[] = "history2"; 145 const char kChromeUIHistogramsHost[] = "histograms";
119 const char kChromeUIInspectorHost[] = "inspector"; 146 const char kChromeUIIPCHost[] = "ipc";
120 const char kChromeUIKeyboardHost[] = "keyboard"; 147 const char kChromeUIKeyboardHost[] = "keyboard";
148 const char kChromeUIKillHost[] = "kill";
149 const char kChromeUIMemoryHost[] = "memory";
150 const char kChromeUIMemoryRedirectHost[] = "memory-redirect";
121 const char kChromeUINetInternalsHost[] = "net-internals"; 151 const char kChromeUINetInternalsHost[] = "net-internals";
152 const char kChromeUINetworkViewCacheHost[] = "view-http-cache";
122 const char kChromeUINewTabHost[] = "newtab"; 153 const char kChromeUINewTabHost[] = "newtab";
123 const char kChromeUIPluginsHost[] = "plugins"; 154 const char kChromeUIPluginsHost[] = "plugins";
124 const char kChromeUIPrintHost[] = "print"; 155 const char kChromeUIPrintHost[] = "print";
125 const char kChromeUIResourcesHost[] = "resources"; 156 const char kChromeUIResourcesHost[] = "resources";
126 const char kChromeUIScreenshotPath[] = "screenshots";
127 const char kChromeUISettingsHost[] = "settings"; 157 const char kChromeUISettingsHost[] = "settings";
158 const char kChromeUIShorthangHost[] = "shorthang";
159 const char kChromeUIStatsHost[] = "stats";
160 const char kChromeUISyncHost[] = "sync";
128 const char kChromeUISyncInternalsHost[] = "sync-internals"; 161 const char kChromeUISyncInternalsHost[] = "sync-internals";
129 const char kChromeUISyncResourcesHost[] = "syncresources"; 162 const char kChromeUISyncResourcesHost[] = "syncresources";
163 const char kChromeUITasksHost[] = "tasks";
164 const char kChromeUITCMallocHost[] = "tcmalloc";
130 const char kChromeUITextfieldsHost[] = "textfields"; 165 const char kChromeUITextfieldsHost[] = "textfields";
166 const char kChromeUITermsHost[] = "terms";
167 const char kChromeUITouchIconHost[] = "touch-icon";
168 const char kChromeUIVersionHost[] = "version";
169
170 const char kChromeUIScreenshotPath[] = "screenshots";
131 const char kChromeUIThemePath[] = "theme"; 171 const char kChromeUIThemePath[] = "theme";
132 const char kChromeUIThumbnailPath[] = "thumb"; 172 const char kChromeUIThumbnailPath[] = "thumb";
133 173
174 #if defined(OS_LINUX)
175 const char kChromeUILinuxProxyConfigHost[] = "linux-proxy-config";
176 const char kChromeUISandboxHost[] = "sandbox";
177 #endif
178
134 #if defined(OS_CHROMEOS) 179 #if defined(OS_CHROMEOS)
180 const char kChromeUIActivationMessageHost[] = "activationmessage";
135 const char kChromeUIActiveDownloadsHost[] = "active-downloads"; 181 const char kChromeUIActiveDownloadsHost[] = "active-downloads";
136 const char kChromeUIActivationMessageHost[] = "activationmessage";
137 const char kChromeUIChooseMobileNetworkHost[] = "choose-mobile-network"; 182 const char kChromeUIChooseMobileNetworkHost[] = "choose-mobile-network";
138 const char kChromeUICollectedCookiesHost[] = "collected-cookies"; 183 const char kChromeUICollectedCookiesHost[] = "collected-cookies";
184 const char kChromeUIEnterpriseEnrollmentHost[] = "enterprise-enrollment";
139 const char kChromeUIHttpAuthHost[] = "http-auth"; 185 const char kChromeUIHttpAuthHost[] = "http-auth";
140 const char kChromeUIImageBurnerHost[] = "imageburner"; 186 const char kChromeUIImageBurnerHost[] = "imageburner";
141 const char kChromeUIKeyboardOverlayHost[] = "keyboardoverlay"; 187 const char kChromeUIKeyboardOverlayHost[] = "keyboardoverlay";
188 const char kChromeUILoginContainerHost[] = "login-container";
189 const char kChromeUILoginHost[] = "login";
142 const char kChromeUIMediaplayerHost[] = "mediaplayer"; 190 const char kChromeUIMediaplayerHost[] = "mediaplayer";
143 const char kChromeUIMobileSetupHost[] = "mobilesetup"; 191 const char kChromeUIMobileSetupHost[] = "mobilesetup";
192 const char kChromeUINetworkHost[] = "network";
144 const char kChromeUIOobeHost[] = "oobe"; 193 const char kChromeUIOobeHost[] = "oobe";
194 const char kChromeUIOSCreditsHost[] = "os-credits";
145 const char kChromeUIProxySettingsHost[] = "proxy-settings"; 195 const char kChromeUIProxySettingsHost[] = "proxy-settings";
146 const char kChromeUIRegisterPageHost[] = "register"; 196 const char kChromeUIRegisterPageHost[] = "register";
147 const char kChromeUISlideshowHost[] = "slideshow"; 197 const char kChromeUISlideshowHost[] = "slideshow";
148 const char kChromeUISimUnlockHost[] = "sim-unlock"; 198 const char kChromeUISimUnlockHost[] = "sim-unlock";
149 const char kChromeUISystemInfoHost[] = "system"; 199 const char kChromeUISystemInfoHost[] = "system";
200 const char kChromeUIUserImageHost[] = "userimage";
201
150 const char kChromeUIMenu[] = "menu"; 202 const char kChromeUIMenu[] = "menu";
151 const char kChromeUIWrenchMenu[] = "wrench-menu"; 203 const char kChromeUIWrenchMenu[] = "wrench-menu";
152 const char kChromeUINetworkMenu[] = "network-menu"; 204 const char kChromeUINetworkMenu[] = "network-menu";
153 const char kChromeUIUserImageHost[] = "userimage"; 205
154 const char kChromeUIEnterpriseEnrollmentHost[] = "enterprise-enrollment"; 206 const char kEULAPathFormat[] = "/usr/share/chromeos-assets/eula/%s/eula.html";
155 const char kChromeUILoginContainerHost[] = "login-container";
156 const char kChromeUILoginHost[] = "login";
157 #endif 207 #endif
158 208
159 const char kAppCacheViewInternalsURL[] = "chrome://appcache-internals/";
160
161 const char kBlobViewInternalsURL[] = "chrome://blob-internals/";
162
163 const char kCloudPrintResourcesURL[] = "chrome://cloudprintresources/";
164 const char kCloudPrintResourcesHost[] = "cloudprintresources";
165 const char kCloudPrintSetupHost[] = "cloudprintsetup";
166
167 const char kNetworkViewInternalsURL[] = "chrome://net-internals/";
168 const char kNetworkViewCacheURL[] = "chrome://view-http-cache/";
169
170 const char kSyncViewInternalsURL[] = "chrome://sync-internals/";
171 const char kSyncGoogleDashboardURL[] = "https://www.google.com/dashboard/";
172
173 // GPU sub pages
174 const char kGpuInternalsURL[] = "chrome://gpu-internals/";
175
176 // Option sub pages. 209 // Option sub pages.
177 const char kAdvancedOptionsSubPage[] = "advanced"; 210 const char kAdvancedOptionsSubPage[] = "advanced";
178 const char kAutofillSubPage[] = "autofill"; 211 const char kAutofillSubPage[] = "autofill";
179 const char kBrowserOptionsSubPage[] = "browser"; 212 const char kBrowserOptionsSubPage[] = "browser";
180 const char kClearBrowserDataSubPage[] = "clearBrowserData"; 213 const char kClearBrowserDataSubPage[] = "clearBrowserData";
181 const char kContentSettingsSubPage[] = "content"; 214 const char kContentSettingsSubPage[] = "content";
182 const char kContentSettingsExceptionsSubPage[] = "contentExceptions"; 215 const char kContentSettingsExceptionsSubPage[] = "contentExceptions";
183 const char kImportDataSubPage[] = "importData"; 216 const char kImportDataSubPage[] = "importData";
184 const char kInstantConfirmPage[] = "instantConfirm"; 217 const char kInstantConfirmPage[] = "instantConfirm";
185 const char kLanguageOptionsSubPage[] = "languages"; 218 const char kLanguageOptionsSubPage[] = "languages";
186 const char kPersonalOptionsSubPage[] = "personal"; 219 const char kPersonalOptionsSubPage[] = "personal";
187 const char kPasswordManagerSubPage[] = "passwords"; 220 const char kPasswordManagerSubPage[] = "passwords";
188 const char kSearchEnginesSubPage[] = "searchEngines"; 221 const char kSearchEnginesSubPage[] = "searchEngines";
189 const char kSyncSetupSubPage[] = "syncSetup"; 222 const char kSyncSetupSubPage[] = "syncSetup";
190 #if defined(OS_CHROMEOS) 223 #if defined(OS_CHROMEOS)
191 const char kInternetOptionsSubPage[] = "internet"; 224 const char kInternetOptionsSubPage[] = "internet";
192 const char kSystemOptionsSubPage[] = "system"; 225 const char kSystemOptionsSubPage[] = "system";
193 #endif 226 #endif
194 227
228 const char kSyncGoogleDashboardURL[] = "https://www.google.com/dashboard/";
229
195 const char kPasswordManagerLearnMoreURL[] = 230 const char kPasswordManagerLearnMoreURL[] =
196 #if defined(OS_CHROMEOS) 231 #if defined(OS_CHROMEOS)
197 "https://www.google.com/support/chromeos/bin/answer.py?answer=95606"; 232 "https://www.google.com/support/chromeos/bin/answer.py?answer=95606";
198 #else 233 #else
199 "https://www.google.com/support/chrome/bin/answer.py?answer=95606"; 234 "https://www.google.com/support/chrome/bin/answer.py?answer=95606";
200 #endif 235 #endif
201 236
202 const char kChromeHelpURL[] = 237 const char kChromeHelpURL[] =
203 #if defined(OS_CHROMEOS) 238 #if defined(OS_CHROMEOS)
204 "https://www.google.com/support/chromeos/"; 239 "https://www.google.com/support/chromeos/";
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 295
261 // Prevent future modification of the standard schemes list. This is to 296 // Prevent future modification of the standard schemes list. This is to
262 // prevent accidental creation of data races in the program. AddStandardScheme 297 // prevent accidental creation of data races in the program. AddStandardScheme
263 // isn't threadsafe so must be called when GURL isn't used on any other 298 // isn't threadsafe so must be called when GURL isn't used on any other
264 // thread. This is really easy to mess up, so we say that all calls to 299 // thread. This is really easy to mess up, so we say that all calls to
265 // AddStandardScheme in Chrome must be inside this function. 300 // AddStandardScheme in Chrome must be inside this function.
266 url_util::LockStandardSchemes(); 301 url_util::LockStandardSchemes();
267 } 302 }
268 303
269 } // namespace chrome 304 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/url_constants.h ('k') | chrome/renderer/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698