1 // Copyright (c) 2012 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 // Contains constants for known URLs and portions thereof. 6 7 #ifndef CHROME_COMMON_URL_CONSTANTS_H_ 8 #define CHROME_COMMON_URL_CONSTANTS_H_ 9 10 #include <string> 11 #include <vector> 12 13 #include "build/build_config.h" 14 #include "content/public/common/url_constants.h" 15 16 namespace chrome { 17 18 // TODO(msw): Resolve chrome_frame dependency on these constants. 19 extern const char kAboutComponentsURL[]; 20 extern const char kAboutPluginsURL[]; 21 extern const char kAboutVersionURL[]; 22 23 // chrome: URLs (including schemes). Should be kept in sync with the 24 // components below. 25 extern const char kChromeUIAboutURL[]; 26 extern const char kChromeUIAppsURL[]; 27 extern const char kChromeUIAppListStartPageURL[]; 28 extern const char kChromeUIBookmarksURL[]; 29 extern const char kChromeUICertificateViewerURL[]; 30 extern const char kChromeUIChromeSigninURL[]; 31 extern const char kChromeUIChromeURLsURL[]; 32 extern const char kChromeUICloudPrintResourcesURL[]; 33 extern const char kChromeUIComponentsURL[]; 34 extern const char kChromeUIConflictsURL[]; 35 extern const char kChromeUIConstrainedHTMLTestURL[]; 36 extern const char kChromeUICrashesURL[]; 37 extern const char kChromeUICreditsURL[]; 38 extern const char kChromeUIDevicesURL[]; 39 extern const char kChromeUIDevToolsURL[]; 40 extern const char kChromeUIDownloadsURL[]; 41 extern const char kChromeUIEditSearchEngineDialogURL[]; 42 extern const char kChromeUIExtensionIconURL[]; 43 extern const char kChromeUIExtensionInfoURL[]; 44 extern const char kChromeUIExtensionsFrameURL[]; 45 extern const char kChromeUIExtensionsURL[]; 46 extern const char kChromeUIFaviconURL[]; 47 extern const char kChromeUIFeedbackURL[]; 48 extern const char kChromeUIFlagsURL[]; 49 extern const char kChromeUIFlashURL[]; 50 extern const char kChromeUIHelpFrameURL[]; 51 extern const char kChromeUIHistoryURL[]; 52 extern const char kChromeUIHistoryFrameURL[]; 53 extern const char kChromeUIIdentityInternalsURL[]; 54 extern const char kChromeUIInspectURL[]; 55 extern const char kChromeUIInstantURL[]; 56 extern const char kChromeUIIPCURL[]; 57 extern const char kChromeUIManagedUserPassphrasePageURL[]; 58 extern const char kChromeUIMemoryRedirectURL[]; 59 extern const char kChromeUIMemoryURL[]; 60 extern const char kChromeUIMetroFlowURL[]; 61 extern const char kChromeUINaClURL[]; 62 extern const char kChromeUINetInternalsURL[]; 63 extern const char kChromeUINewProfile[]; 64 extern const char kChromeUINewTabURL[]; 65 extern const char kChromeUIOmniboxURL[]; 66 extern const char kChromeUIPerformanceMonitorURL[]; 67 extern const char kChromeUIPluginsURL[]; 68 extern const char kChromeUIPolicyURL[]; 69 extern const char kChromeUIProfileSigninConfirmationURL[]; 70 extern const char kChromeUIUserManagerURL[]; 71 extern const char kChromeUIPrintURL[]; 72 extern const char kChromeUIQuitURL[]; 73 extern const char kChromeUIRestartURL[]; 74 extern const char kChromeUISessionFaviconURL[]; 75 extern const char kChromeUISettingsURL[]; 76 extern const char kChromeUISettingsFrameURL[]; 77 extern const char kChromeUISuggestionsInternalsURL[]; 78 extern const char kChromeUISSLClientCertificateSelectorURL[]; 79 extern const char kChromeUITaskManagerURL[]; 80 extern const char kChromeUITermsURL[]; 81 extern const char kChromeUIThemeURL[]; 82 extern const char kChromeUIThumbnailURL[]; 83 extern const char kChromeUIThumbnailListURL[]; 84 extern const char kChromeUIUberURL[]; 85 extern const char kChromeUIUberFrameURL[]; 86 extern const char kChromeUIUserActionsURL[]; 87 extern const char kChromeUIVersionURL[]; 88 89 #if defined(OS_ANDROID) 90 extern const char kChromeUINativeNewTabURL[]; 91 extern const char kChromeUIWelcomeURL[]; 92 #endif 93 94 #if defined(OS_CHROMEOS) 95 extern const char kChromeUIActivationMessage[]; 96 extern const char kChromeUIBluetoothPairingURL[]; 97 extern const char kChromeUIChargerReplacementURL[]; 98 extern const char kChromeUIChooseMobileNetworkURL[]; 99 extern const char kChromeUIDiagnosticsURL[]; 100 extern const char kChromeUIDiscardsURL[]; 101 extern const char kChromeUIFirstRunURL[]; 102 extern const char kChromeUIIdleLogoutDialogURL[]; 103 extern const char kChromeUIImageBurnerURL[]; 104 extern const char kChromeUIKeyboardOverlayURL[]; 105 extern const char kChromeUILockScreenURL[]; 106 extern const char kChromeUIMediaplayerURL[]; 107 extern const char kChromeUIMobileSetupURL[]; 108 extern const char kChromeUIOobeURL[]; 109 extern const char kChromeUIOSCreditsURL[]; 110 extern const char kChromeUIProxySettingsURL[]; 111 extern const char kChromeUIScreenlockIconURL[]; 112 extern const char kChromeUISimUnlockURL[]; 113 extern const char kChromeUISlideshowURL[]; 114 extern const char kChromeUISlowURL[]; 115 extern const char kChromeUISystemInfoURL[]; 116 extern const char kChromeUITermsOemURL[]; 117 extern const char kChromeUIUserImageURL[]; 118 #endif 119 120 #if defined(USE_AURA) 121 extern const char kChromeUIGestureConfigURL[]; 122 extern const char kChromeUIGestureConfigHost[]; 123 extern const char kChromeUISalsaURL[]; 124 extern const char kChromeUISalsaHost[]; 125 #endif 126 127 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) 128 extern const char kChromeUITabModalConfirmDialogURL[]; 129 #endif 130 131 #if defined(ENABLE_WEBRTC) 132 extern const char kChromeUIWebRtcLogsURL[]; 133 #endif 134 135 // chrome components of URLs. Should be kept in sync with the full URLs above. 136 extern const char kChromeUIAboutHost[]; 137 extern const char kChromeUIAboutPageFrameHost[]; 138 extern const char kChromeUIBlankHost[]; 139 extern const char kChromeUIAppLauncherPageHost[]; 140 extern const char kChromeUIAppListStartPageHost[]; 141 extern const char kChromeUIBookmarksHost[]; 142 extern const char kChromeUICacheHost[]; 143 extern const char kChromeUICertificateViewerHost[]; 144 extern const char kChromeUIChromeSigninHost[]; 145 extern const char kChromeUIChromeURLsHost[]; 146 extern const char kChromeUICloudPrintResourcesHost[]; 147 extern const char kChromeUICloudPrintSetupHost[]; 148 extern const char kChromeUIConflictsHost[]; 149 extern const char kChromeUIConstrainedHTMLTestHost[]; 150 extern const char kChromeUICrashesHost[]; 151 extern const char kChromeUICrashHost[]; 152 extern const char kChromeUICreditsHost[]; 153 extern const char kChromeUIDefaultHost[]; 154 extern const char kChromeUIDevicesHost[]; 155 extern const char kChromeUIDevToolsHost[]; 156 extern const char kChromeUIDevToolsBundledPath[]; 157 extern const char kChromeUIDevToolsRemotePath[]; 158 extern const char kChromeUIDNSHost[]; 159 extern const char kChromeUIDownloadsHost[]; 160 extern const char kChromeUIDriveInternalsHost[]; 161 extern const char kChromeUIEditSearchEngineDialogHost[]; 162 extern const char kChromeUIEnhancedBookmarksHost[]; 163 extern const char kChromeUIExtensionIconHost[]; 164 extern const char kChromeUIExtensionInfoHost[]; 165 extern const char kChromeUIExtensionsFrameHost[]; 166 extern const char kChromeUIExtensionsHost[]; 167 extern const char kChromeUIFaviconHost[]; 168 extern const char kChromeUIFeedbackHost[]; 169 extern const char kChromeUIFlagsHost[]; 170 extern const char kChromeUIFlashHost[]; 171 extern const char kChromeUIHelpFrameHost[]; 172 extern const char kChromeUIHelpHost[]; 173 extern const char kChromeUIHangHost[]; 174 extern const char kChromeUIHistoryHost[]; 175 extern const char kChromeUIHistoryFrameHost[]; 176 extern const char kChromeUIIdentityInternalsHost[]; 177 extern const char kChromeUIInspectHost[]; 178 extern const char kChromeUIInstantHost[]; 179 extern const char kChromeUIIPCHost[]; 180 extern const char kChromeUIKillHost[]; 181 extern const char kChromeUIManagedUserPassphrasePageHost[]; 182 extern const char kChromeUIMemoryHost[]; 183 extern const char kChromeUIMemoryInternalsHost[]; 184 extern const char kChromeUIMemoryRedirectHost[]; 185 extern const char kChromeUIMetroFlowHost[]; 186 extern const char kChromeUINaClHost[]; 187 extern const char kChromeUINetExportHost[]; 188 extern const char kChromeUINetInternalsHost[]; 189 extern const char kChromeUINewTabHost[]; 190 extern const char kChromeUIOmniboxHost[]; 191 extern const char kChromeUIPerformanceMonitorHost[]; 192 extern const char kChromeUIPluginsHost[]; 193 extern const char kChromeUIComponentsHost[]; 194 extern const char kChromeUIPolicyHost[]; 195 extern const char kChromeUIProfileSigninConfirmationHost[]; 196 extern const char kChromeUIUserManagerHost[]; 197 extern const char kChromeUIPredictorsHost[]; 198 extern const char kChromeUIPrintHost[]; 199 extern const char kChromeUIProfilerHost[]; 200 extern const char kChromeUIQuotaInternalsHost[]; 201 extern const char kChromeUIQuitHost[]; 202 extern const char kChromeUIRestartHost[]; 203 extern const char kChromeUISessionFaviconHost[]; 204 extern const char kChromeUISettingsHost[]; 205 extern const char kChromeUISettingsFrameHost[]; 206 extern const char kChromeUIShorthangHost[]; 207 extern const char kChromeUISignInInternalsHost[]; 208 extern const char kChromeUISuggestionsInternalsHost[]; 209 extern const char kChromeUISSLClientCertificateSelectorHost[]; 210 extern const char kChromeUIStatsHost[]; 211 extern const char kChromeUISyncHost[]; 212 extern const char kChromeUISyncFileSystemInternalsHost[]; 213 extern const char kChromeUISyncInternalsHost[]; 214 extern const char kChromeUISyncResourcesHost[]; 215 extern const char kChromeUITaskManagerHost[]; 216 extern const char kChromeUITermsHost[]; 217 extern const char kChromeUIThemeHost[]; 218 extern const char kChromeUIThumbnailHost[]; 219 extern const char kChromeUIThumbnailHost2[]; 220 extern const char kChromeUIThumbnailListHost[]; 221 extern const char kChromeUITouchIconHost[]; 222 extern const char kChromeUITranslateInternalsHost[]; 223 extern const char kChromeUIUberFrameHost[]; 224 extern const char kChromeUIUberHost[]; 225 extern const char kChromeUIUserActionsHost[]; 226 extern const char kChromeUIVersionHost[]; 227 extern const char kChromeUIWorkersHost[]; 228 229 extern const char kChromeUIScreenshotPath[]; 230 extern const char kChromeUIThemePath[]; 231 232 #if defined(OS_ANDROID) 233 extern const char kChromeUIWelcomeHost[]; 234 #endif 235 236 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 237 extern const char kChromeUILinuxProxyConfigHost[]; 238 extern const char kChromeUISandboxHost[]; 239 #endif 240 241 #if defined(OS_CHROMEOS) 242 extern const char kChromeUIActivationMessageHost[]; 243 extern const char kChromeUIAppLaunchHost[]; 244 extern const char kChromeUIBluetoothPairingHost[]; 245 extern const char kChromeUIChargerReplacementHost[]; 246 extern const char kChromeUIChooseMobileNetworkHost[]; 247 extern const char kChromeUICryptohomeHost[]; 248 extern const char kChromeUIDiagnosticsHost[]; 249 extern const char kChromeUIDiscardsHost[]; 250 extern const char kChromeUIFirstRunHost[]; 251 extern const char kChromeUIIdleLogoutDialogHost[]; 252 extern const char kChromeUIImageBurnerHost[]; 253 extern const char kChromeUIKeyboardOverlayHost[]; 254 extern const char kChromeUILockScreenHost[]; 255 extern const char kChromeUILoginContainerHost[]; 256 extern const char kChromeUILoginHost[]; 257 extern const char kChromeUIMediaplayerHost[]; 258 extern const char kChromeUIMobileSetupHost[]; 259 extern const char kChromeUINetworkHost[]; 260 extern const char kChromeUIOobeHost[]; 261 extern const char kChromeUIOSCreditsHost[]; 262 extern const char kChromeUIProxySettingsHost[]; 263 extern const char kChromeUIRotateHost[]; 264 extern const char kChromeUIScreenlockIconHost[]; 265 extern const char kChromeUISimUnlockHost[]; 266 extern const char kChromeUISlideshowHost[]; 267 extern const char kChromeUISlowHost[]; 268 extern const char kChromeUISlowTraceHost[]; 269 extern const char kChromeUISystemInfoHost[]; 270 extern const char kChromeUIUserImageHost[]; 271 272 extern const char kChromeUIMenu[]; 273 extern const char kChromeUINetworkMenu[]; 274 extern const char kChromeUIWrenchMenu[]; 275 276 extern const char kEULAPathFormat[]; 277 extern const char kOemEulaURLPath[]; 278 extern const char kOnlineEulaURLPath[]; 279 #endif 280 281 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) 282 extern const char kChromeUITabModalConfirmDialogHost[]; 283 #endif 284 285 #if defined(ENABLE_WEBRTC) 286 extern const char kChromeUIWebRtcLogsHost[]; 287 #endif 288 289 // Options sub-pages. 290 extern const char kAutofillSubPage[]; 291 extern const char kClearBrowserDataSubPage[]; 292 extern const char kContentSettingsExceptionsSubPage[]; 293 extern const char kContentSettingsSubPage[]; 294 extern const char kCreateProfileSubPage[]; 295 extern const char kExtensionsSubPage[]; 296 extern const char kHandlerSettingsSubPage[]; 297 extern const char kImportDataSubPage[]; 298 extern const char kLanguageOptionsSubPage[]; 299 extern const char kManagedUserSettingsSubPage[]; 300 extern const char kManageProfileSubPage[]; 301 extern const char kPasswordManagerSubPage[]; 302 extern const char kResetProfileSettingsSubPage[]; 303 extern const char kSearchEnginesSubPage[]; 304 extern const char kSearchSubPage[]; 305 extern const char kSearchUsersSubPage[]; 306 extern const char kSyncSetupSubPage[]; 307 #if defined(OS_CHROMEOS) 308 extern const char kInternetOptionsSubPage[]; 309 extern const char kBluetoothAddDeviceSubPage[]; 310 extern const char kChangeProfilePictureSubPage[]; 311 #endif 312 313 // Extensions sub pages. 314 extern const char kExtensionConfigureCommandsSubPage[]; 315 316 // URLs used to indicate that an extension resource load request 317 // was invalid. 318 extern const char kExtensionInvalidRequestURL[]; 319 extern const char kExtensionResourceInvalidRequestURL[]; 320 321 extern const char kSyncGoogleDashboardURL[]; 322 323 // "Learn more" URL for the auto password generation. 324 extern const char kAutoPasswordGenerationLearnMoreURL[]; 325 326 extern const char kPasswordManagerLearnMoreURL[]; 327 328 // General help links for Chrome, opened using various actions. 329 extern const char kChromeHelpViaKeyboardURL[]; 330 extern const char kChromeHelpViaMenuURL[]; 331 extern const char kChromeHelpViaWebUIURL[]; 332 333 #if defined(OS_CHROMEOS) 334 // Accessibility help link for Chrome. 335 extern const char kChromeAccessibilityHelpURL[]; 336 // Accessibility settings link for Chrome. 337 extern const char kChromeAccessibilitySettingsURL[]; 338 #endif 339 340 #if defined (ENABLE_ONE_CLICK_SIGNIN) 341 // "Learn more" URL for the one click signin infobar. 342 extern const char kChromeSyncLearnMoreURL[]; 343 344 // "Learn more" URL for the "Sign in with a different account" confirmation 345 // dialog. 346 extern const char kChromeSyncMergeTroubleshootingURL[]; 347 #endif 348 349 // "Learn more" URL for the enterprise sign-in confirmation dialog. 350 extern const char kChromeEnterpriseSignInLearnMoreURL[]; 351 352 // "Learn more" URL for resetting profile preferences. 353 extern const char kResetProfileSettingsLearnMoreURL[]; 354 355 // Management URL for the supervised users. 356 extern const char kSupervisedUserManagementURL[]; 357 358 // Management URL for the supervised users - version without scheme, used 359 // for display. 360 extern const char kSupervisedUserManagementDisplayURL[]; 361 362 // Help URL for the settings page's search feature. 363 extern const char kSettingsSearchHelpURL[]; 364 365 // "About" URL for the translate bar's options menu. 366 extern const char kAboutGoogleTranslateURL[]; 367 368 // Help URL for the Omnibox setting. 369 extern const char kOmniboxLearnMoreURL[]; 370 371 // "What do these mean?" URL for the Page Info bubble. 372 extern const char kPageInfoHelpCenterURL[]; 373 374 // "Learn more" URL for "Aw snap" page. 375 extern const char kCrashReasonURL[]; 376 377 // "Learn more" URL for killed tab page. 378 extern const char kKillReasonURL[]; 379 380 // "Learn more" URL for the Privacy section under Options. 381 extern const char kPrivacyLearnMoreURL[]; 382 383 // "Learn more" URL for the "Do not track" setting in the privacy section. 384 extern const char kDoNotTrackLearnMoreURL[]; 385 386 #if defined(OS_CHROMEOS) 387 // These URLs are currently ChromeOS only. 388 389 // "Learn more" URL for the attestation of content protection setting. 390 extern const char kAttestationForContentProtectionLearnMoreURL[]; 391 392 // "Learn more" URL for the enhanced playback notification dialog. 393 extern const char kEnhancedPlaybackNotificationLearnMoreURL[]; 394 #endif 395 396 // The URL for the Chromium project used in the About dialog. 397 extern const char kChromiumProjectURL[]; 398 399 // The URL for the "Learn more" page for the usage/crash reporting option in the 400 // first run dialog. 401 extern const char kLearnMoreReportingURL[]; 402 403 // The URL for the "Learn more" page for the outdated plugin infobar. 404 extern const char kOutdatedPluginLearnMoreURL[]; 405 406 // The URL for the "Learn more" page for the blocked plugin infobar. 407 extern const char kBlockedPluginLearnMoreURL[]; 408 409 // The URL for the "About Voice Recognition" menu item. 410 extern const char kSpeechInputAboutURL[]; 411 412 // The URL for the "Learn more" page for register protocol handler infobars. 413 extern const char kLearnMoreRegisterProtocolHandlerURL[]; 414 415 // The URL for the "Learn more" page for sync setup on the personal stuff page. 416 extern const char kSyncLearnMoreURL[]; 417 418 // The URL for the "Learn more" page for download scanning. 419 extern const char kDownloadScanningLearnMoreURL[]; 420 421 // The URL for the "Learn more" page for interrupted downloads. 422 extern const char kDownloadInterruptedLearnMoreURL[]; 423 424 // The URL for the "Learn more" page on the sync setup dialog, when syncing 425 // everything. 426 extern const char kSyncEverythingLearnMoreURL[]; 427 428 // The URL for information on how to use the app launcher. 429 extern const char kAppLauncherHelpURL[]; 430 431 // The URL for the "Learn more" page on sync encryption. 432 extern const char kSyncEncryptionHelpURL[]; 433 434 // The URL for the "Learn more" link when there is a sync error. 435 extern const char kSyncErrorsHelpURL[]; 436 437 #if defined(OS_CHROMEOS) 438 // The URL for the "Learn more" link for natural scrolling on ChromeOS. 439 extern const char kNaturalScrollHelpURL[]; 440 441 // The URL for the Learn More page about enterprise enrolled devices. 442 extern const char kLearnMoreEnterpriseURL[]; 443 #endif 444 445 // The URL for the Learn More link of the non-CWS bubble. 446 extern const char kRemoveNonCWSExtensionURL[]; 447 448 extern const char kNotificationsHelpURL[]; 449 450 // The Welcome Notification More Info URL. 451 extern const char kNotificationWelcomeLearnMoreURL[]; 452 453 // Gets the hosts/domains that are shown in chrome://chrome-urls. 454 extern const char* const kChromeHostURLs[]; 455 extern const size_t kNumberOfChromeHostURLs; 456 457 // "Debug" pages which are dangerous and not for general consumption. 458 extern const char* const kChromeDebugURLs[]; 459 extern const int kNumberOfChromeDebugURLs; 460 461 // Canonical schemes you can use as input to GURL.SchemeIs(). 462 extern const char kExtensionResourceScheme[]; 463 464 // The chrome-native: scheme is used show pages rendered with platform specific 465 // widgets instead of using HTML. 466 extern const char kChromeNativeScheme[]; 467 468 // The chrome-search: scheme is served by the same backend as chrome:. However, 469 // only specific URLDataSources are enabled to serve requests via the 470 // chrome-search: scheme. See |InstantIOContext::ShouldServiceRequest| and its 471 // callers for details. Note that WebUIBindings should never be granted to 472 // chrome-search: pages. chrome-search: pages are displayable but not readable 473 // by external search providers (that are rendered by Instant renderer 474 // processes), and neither displayable nor readable by normal (non-Instant) web 475 // pages. To summarize, a non-Instant process, when trying to access 476 // 'chrome-search://something', will bump up against the following: 477 // 478 // 1. Renderer: The display-isolated check in WebKit will deny the request, 479 // 2. Browser: Assuming they got by #1, the scheme checks in 480 // URLDataSource::ShouldServiceRequest will deny the request, 481 // 3. Browser: for specific sub-classes of URLDataSource, like ThemeSource 482 // there are additional Instant-PID checks that make sure the request is 483 // coming from a blessed Instant process, and deny the request. 484 extern const char kChromeSearchScheme[]; 485 486 // Pages under chrome-search. 487 extern const char kChromeSearchLocalNtpHost[]; 488 extern const char kChromeSearchLocalNtpUrl[]; 489 extern const char kChromeSearchOnlineNtpHost[]; 490 491 // Host and URL for most visited iframes used on the Instant Extended NTP. 492 extern const char kChromeSearchMostVisitedHost[]; 493 extern const char kChromeSearchMostVisitedUrl[]; 494 495 #if defined(OS_CHROMEOS) 496 extern const char kCrosScheme[]; 497 extern const char kDriveScheme[]; 498 #endif 499 500 // "Learn more" URL for the Cloud Print section under Options. 501 extern const char kCloudPrintLearnMoreURL[]; 502 503 // "Learn more" URL for the Cloud Print Preview No Destinations Promotion. 504 extern const char kCloudPrintNoDestinationsLearnMoreURL[]; 505 506 // Parameters that get appended to force SafeSearch. 507 extern const char kSafeSearchSafeParameter[]; 508 extern const char kSafeSearchSsuiParameter[]; 509 510 // The URL for the "Learn more" link in the media access infobar. 511 extern const char kMediaAccessLearnMoreUrl[]; 512 513 } // namespace chrome 514 515 #endif // CHROME_COMMON_URL_CONSTANTS_H_ 516