Home | History | Annotate | Download | only in common
      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 #include "chrome/common/url_constants.h"
      6 
      7 #include <algorithm>
      8 
      9 #include "base/basictypes.h"
     10 #include "content/public/common/url_constants.h"
     11 #include "url/url_util.h"
     12 
     13 namespace chrome {
     14 
     15 #if defined(OS_CHROMEOS)
     16 const char kCrosScheme[] = "cros";
     17 const char kExternalFileScheme[] = "externalfile";
     18 #endif
     19 
     20 // Add Chrome UI URLs as necessary, in alphabetical order.
     21 // Be sure to add the corresponding kChromeUI*Host constant below.
     22 // This is a WebUI page that lists other WebUI pages.
     23 const char kChromeUIAboutURL[] = "chrome://about/";
     24 const char kChromeUIAppsURL[] = "chrome://apps/";
     25 const char kChromeUIAppListStartPageURL[] = "chrome://app-list/";
     26 const char kChromeUIBookmarksURL[] = "chrome://bookmarks/";
     27 const char kChromeUICertificateViewerURL[] = "chrome://view-cert/";
     28 const char kChromeUICertificateViewerDialogURL[] = "chrome://view-cert-dialog/";
     29 const char kChromeUIChromeSigninURL[] = "chrome://chrome-signin/";
     30 const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
     31 const char kChromeUICloudPrintResourcesURL[] = "chrome://cloudprintresources/";
     32 const char kChromeUIComponentsURL[] = "chrome://components/";
     33 const char kChromeUIConflictsURL[] = "chrome://conflicts/";
     34 const char kChromeUIConstrainedHTMLTestURL[] = "chrome://constrained-test/";
     35 const char kChromeUIContextualSearchPromoURL[] =
     36     "chrome://contextual-search-promo";
     37 const char kChromeUICrashesURL[] = "chrome://crashes/";
     38 const char kChromeUICreditsURL[] = "chrome://credits/";
     39 const char kChromeUIDevicesURL[] = "chrome://devices/";
     40 const char kChromeUIDevToolsURL[] =
     41     "chrome-devtools://devtools/bundled/devtools.html";
     42 const char kChromeUIDomainReliabilityInternalsURL[] =
     43     "chrome://domain-reliability-internals/";
     44 const char kChromeUIDownloadsURL[] = "chrome://downloads/";
     45 const char kChromeUIEditSearchEngineDialogURL[] = "chrome://editsearchengine/";
     46 const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/";
     47 const char kChromeUIExtensionInfoURL[] = "chrome://extension-info/";
     48 const char kChromeUIExtensionsFrameURL[] = "chrome://extensions-frame/";
     49 const char kChromeUIExtensionsURL[] = "chrome://extensions/";
     50 const char kChromeUIFaviconURL[] = "chrome://favicon/";
     51 const char kChromeUIFeedbackURL[] = "chrome://feedback/";
     52 const char kChromeUIFlagsURL[] = "chrome://flags/";
     53 const char kChromeUIFlashURL[] = "chrome://flash/";
     54 const char kChromeUIGCMInternalsURL[] = "chrome://gcm-internals/";
     55 const char kChromeUIHelpFrameURL[] = "chrome://help-frame/";
     56 const char kChromeUIHistoryURL[] = "chrome://history/";
     57 const char kChromeUIHistoryFrameURL[] = "chrome://history-frame/";
     58 const char kChromeUIIdentityInternalsURL[] = "chrome://identity-internals/";
     59 const char kChromeUIInspectURL[] = "chrome://inspect/";
     60 const char kChromeUIInstantURL[] = "chrome://instant/";
     61 const char kChromeUIInterstitialURL[] = "chrome://interstitials/";
     62 const char kChromeUIInvalidationsURL[] = "chrome://invalidations/";
     63 const char kChromeUIIPCURL[] = "chrome://ipc/";
     64 const char kChromeUIMemoryRedirectURL[] = "chrome://memory-redirect/";
     65 const char kChromeUIMemoryURL[] = "chrome://memory/";
     66 const char kChromeUIMetroFlowURL[] = "chrome://make-metro/";
     67 const char kChromeUINaClURL[] = "chrome://nacl/";
     68 const char kChromeUINetInternalsURL[] = "chrome://net-internals/";
     69 const char kChromeUINewProfile[] = "chrome://newprofile/";
     70 const char kChromeUINewTabURL[] = "chrome://newtab/";
     71 const char kChromeUIOmniboxURL[] = "chrome://omnibox/";
     72 const char kChromeUIPluginsURL[] = "chrome://plugins/";
     73 const char kChromeUIPolicyURL[] = "chrome://policy/";
     74 const char kChromeUIProfileSigninConfirmationURL[] =
     75     "chrome://profile-signin-confirmation/";
     76 const char kChromeUIUserManagerURL[] = "chrome://user-manager/";
     77 const char kChromeUIPrintURL[] = "chrome://print/";
     78 const char kChromeUIQuitURL[] = "chrome://quit/";
     79 const char kChromeUIRestartURL[] = "chrome://restart/";
     80 const char kChromeUISettingsURL[] = "chrome://settings/";
     81 const char kChromeUISettingsFrameURL[] = "chrome://settings-frame/";
     82 const char kChromeUISSLClientCertificateSelectorURL[] = "chrome://select-cert/";
     83 const char kChromeUISuggestions[] = "chrome://suggestions/";
     84 const char kChromeUISuggestionsInternalsURL[] =
     85     "chrome://suggestions-internals/";
     86 const char kChromeUISupervisedUserPassphrasePageURL[] =
     87     "chrome://managed-user-passphrase/";
     88 const char kChromeUITermsURL[] = "chrome://terms/";
     89 const char kChromeUIThemeURL[] = "chrome://theme/";
     90 const char kChromeUIThumbnailURL[] = "chrome://thumb/";
     91 const char kChromeUIThumbnailListURL[] = "chrome://thumbnails/";
     92 const char kChromeUIUberURL[] = "chrome://chrome/";
     93 const char kChromeUIUberFrameURL[] = "chrome://uber-frame/";
     94 const char kChromeUIUserActionsURL[] = "chrome://user-actions/";
     95 const char kChromeUIVersionURL[] = "chrome://version/";
     96 const char kChromeUIVoiceSearchURL[] = "chrome://voicesearch/";
     97 
     98 #if defined(OS_ANDROID)
     99 const char kChromeUINativeNewTabURL[] = "chrome-native://newtab/";
    100 const char kChromeUINativeBookmarksURL[] = "chrome-native://bookmarks/";
    101 const char kChromeUINativeRecentTabsURL[] = "chrome-native://recent-tabs/";
    102 const char kChromeUIWelcomeURL[] = "chrome://welcome/";
    103 #endif
    104 
    105 #if defined(OS_CHROMEOS)
    106 const char kChromeUIActivationMessage[] = "chrome://activationmessage/";
    107 const char kChromeUIBluetoothPairingURL[] = "chrome://bluetooth-pairing/";
    108 const char kChromeUICertificateManagerDialogURL[] =
    109     "chrome://certificate-manager/";
    110 const char kChromeUIChargerReplacementURL[] = "chrome://charger-replacement/";
    111 const char kChromeUIChooseMobileNetworkURL[] =
    112     "chrome://choose-mobile-network/";
    113 const char kChromeUIDiscardsURL[] = "chrome://discards/";
    114 const char kChromeUIFirstRunURL[] = "chrome://first-run/";
    115 const char kChromeUIIdleLogoutDialogURL[] = "chrome://idle-logout/";
    116 const char kChromeUIImageBurnerURL[] = "chrome://imageburner/";
    117 const char kChromeUIKeyboardOverlayURL[] = "chrome://keyboardoverlay/";
    118 const char kChromeUILockScreenURL[] = "chrome://lock/";
    119 const char kChromeUIMediaplayerURL[] = "chrome://mediaplayer/";
    120 const char kChromeUIMobileSetupURL[] = "chrome://mobilesetup/";
    121 const char kChromeUINfcDebugURL[] = "chrome://nfc-debug/";
    122 const char kChromeUIOobeURL[] = "chrome://oobe/";
    123 const char kChromeUIOSCreditsURL[] = "chrome://os-credits/";
    124 const char kChromeUIProxySettingsURL[] = "chrome://proxy-settings/";
    125 const char kChromeUIScreenlockIconURL[] = "chrome://screenlock-icon/";
    126 const char kChromeUISetTimeURL[] = "chrome://set-time/";
    127 const char kChromeUISimUnlockURL[] = "chrome://sim-unlock/";
    128 const char kChromeUISlideshowURL[] = "chrome://slideshow/";
    129 const char kChromeUISlowURL[] = "chrome://slow/";
    130 const char kChromeUISystemInfoURL[] = "chrome://system/";
    131 const char kChromeUITermsOemURL[] = "chrome://terms/oem";
    132 const char kChromeUIUserImageURL[] = "chrome://userimage/";
    133 #endif
    134 
    135 #if defined(USE_AURA)
    136 const char kChromeUIGestureConfigURL[] = "chrome://gesture/";
    137 const char kChromeUIGestureConfigHost[] = "gesture";
    138 const char kChromeUISalsaURL[] = "chrome://salsa/";
    139 const char kChromeUISalsaHost[] = "salsa";
    140 #endif
    141 
    142 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA)
    143 const char kChromeUITabModalConfirmDialogURL[] =
    144     "chrome://tab-modal-confirm-dialog/";
    145 #endif
    146 
    147 #if defined(ENABLE_WEBRTC)
    148 const char kChromeUIWebRtcLogsURL[] = "chrome://webrtc-logs/";
    149 #endif
    150 
    151 // Add Chrome UI hosts here, in alphabetical order.
    152 // Add hosts to kChromePaths in browser_about_handler.cc to be listed by
    153 // chrome://chrome-urls (about:about) and the built-in AutocompleteProvider.
    154 const char kChromeUIAboutHost[] = "about";
    155 const char kChromeUIBlankHost[] = "blank";
    156 const char kChromeUIAppLauncherPageHost[] = "apps";
    157 const char kChromeUIAppListStartPageHost[] = "app-list";
    158 const char kChromeUIBookmarksHost[] = "bookmarks";
    159 const char kChromeUICacheHost[] = "cache";
    160 const char kChromeUICertificateViewerHost[] = "view-cert";
    161 const char kChromeUICertificateViewerDialogHost[] = "view-cert-dialog";
    162 const char kChromeUIChromeSigninHost[] = "chrome-signin";
    163 const char kChromeUIChromeURLsHost[] = "chrome-urls";
    164 const char kChromeUICloudPrintResourcesHost[] = "cloudprintresources";
    165 const char kChromeUICloudPrintSetupHost[] = "cloudprintsetup";
    166 const char kChromeUIConflictsHost[] = "conflicts";
    167 const char kChromeUIConstrainedHTMLTestHost[] = "constrained-test";
    168 const char kChromeUIContextualSearchPromoHost[] = "contextual-search-promo";
    169 const char kChromeUICrashesHost[] = "crashes";
    170 const char kChromeUICrashHost[] = "crash";
    171 const char kChromeUICreditsHost[] = "credits";
    172 const char kChromeUIDefaultHost[] = "version";
    173 const char kChromeUIDevicesHost[] = "devices";
    174 const char kChromeUIDevToolsHost[] = "devtools";
    175 const char kChromeUIDevToolsBundledPath[] = "bundled";
    176 const char kChromeUIDevToolsRemotePath[] = "remote";
    177 const char kChromeUIDNSHost[] = "dns";
    178 const char kChromeUIDomainReliabilityInternalsHost[] =
    179     "domain-reliability-internals";
    180 const char kChromeUIDownloadsHost[] = "downloads";
    181 const char kChromeUIDriveInternalsHost[] = "drive-internals";
    182 const char kChromeUIEditSearchEngineDialogHost[] = "editsearchengine";
    183 const char kChromeUIExtensionIconHost[] = "extension-icon";
    184 const char kChromeUIExtensionInfoHost[] = "extension-info";
    185 const char kChromeUIExtensionsFrameHost[] = "extensions-frame";
    186 const char kChromeUIExtensionsHost[] = "extensions";
    187 const char kChromeUIFaviconHost[] = "favicon";
    188 const char kChromeUIFeedbackHost[] = "feedback";
    189 const char kChromeUIFlagsHost[] = "flags";
    190 const char kChromeUIFlashHost[] = "flash";
    191 const char kChromeUIGCMInternalsHost[] = "gcm-internals";
    192 const char kChromeUIHangHost[] = "hang";
    193 const char kChromeUIHelpFrameHost[] = "help-frame";
    194 const char kChromeUIHelpHost[] = "help";
    195 const char kChromeUIHistoryHost[] = "history";
    196 const char kChromeUIHistoryFrameHost[] = "history-frame";
    197 const char kChromeUIIdentityInternalsHost[] = "identity-internals";
    198 const char kChromeUIInspectHost[] = "inspect";
    199 const char kChromeUIInstantHost[] = "instant";
    200 const char kChromeUIInterstitialHost[] = "interstitials";
    201 const char kChromeUIInvalidationsHost[] = "invalidations";
    202 const char kChromeUIIPCHost[] = "ipc";
    203 const char kChromeUIKillHost[] = "kill";
    204 const char kChromeUIMemoryHost[] = "memory";
    205 const char kChromeUIMemoryInternalsHost[] = "memory-internals";
    206 const char kChromeUIMemoryRedirectHost[] = "memory-redirect";
    207 const char kChromeUIMetroFlowHost[] = "make-metro";
    208 const char kChromeUINaClHost[] = "nacl";
    209 const char kChromeUINetExportHost[] = "net-export";
    210 const char kChromeUINetInternalsHost[] = "net-internals";
    211 const char kChromeUINewTabHost[] = "newtab";
    212 const char kChromeUIOmniboxHost[] = "omnibox";
    213 const char kChromeUIPasswordManagerInternalsHost[] =
    214     "password-manager-internals";
    215 const char kChromeUIPluginsHost[] = "plugins";
    216 const char kChromeUIComponentsHost[] = "components";
    217 const char kChromeUIPolicyHost[] = "policy";
    218 const char kChromeUIProfileSigninConfirmationHost[] =
    219     "profile-signin-confirmation";
    220 const char kChromeUIUserManagerHost[] = "user-manager";
    221 const char kChromeUIPredictorsHost[] = "predictors";
    222 const char kChromeUIProfilerHost[] = "profiler";
    223 const char kChromeUIQuotaInternalsHost[] = "quota-internals";
    224 const char kChromeUIQuitHost[] = "quit";
    225 const char kChromeUIRestartHost[] = "restart";
    226 const char kChromeUISettingsHost[] = "settings";
    227 const char kChromeUISettingsFrameHost[] = "settings-frame";
    228 const char kChromeUIShorthangHost[] = "shorthang";
    229 const char kChromeUISignInInternalsHost[] = "signin-internals";
    230 const char kChromeUISSLClientCertificateSelectorHost[] = "select-cert";
    231 const char kChromeUIStatsHost[] = "stats";
    232 const char kChromeUISuggestionsHost[] = "suggestions";
    233 const char kChromeUISuggestionsInternalsHost[] = "suggestions-internals";
    234 const char kChromeUISupervisedUserPassphrasePageHost[] =
    235     "managed-user-passphrase";
    236 const char kChromeUISyncHost[] = "sync";
    237 const char kChromeUISyncFileSystemInternalsHost[] = "syncfs-internals";
    238 const char kChromeUISyncInternalsHost[] = "sync-internals";
    239 const char kChromeUISyncResourcesHost[] = "syncresources";
    240 const char kChromeUISystemInfoHost[] = "system";
    241 const char kChromeUITaskManagerHost[] = "tasks";
    242 const char kChromeUITermsHost[] = "terms";
    243 const char kChromeUIThemeHost[] = "theme";
    244 const char kChromeUIThumbnailHost[] = "thumb";
    245 const char kChromeUIThumbnailHost2[] = "thumb2";
    246 const char kChromeUIThumbnailListHost[] = "thumbnails";
    247 const char kChromeUITouchIconHost[] = "touch-icon";
    248 const char kChromeUITranslateInternalsHost[] = "translate-internals";
    249 const char kChromeUIUberFrameHost[] = "uber-frame";
    250 const char kChromeUIUberHost[] = "chrome";
    251 const char kChromeUIUserActionsHost[] = "user-actions";
    252 const char kChromeUIVersionHost[] = "version";
    253 const char kChromeUIVoiceSearchHost[] = "voicesearch";
    254 const char kChromeUIWorkersHost[] = "workers";
    255 
    256 const char kChromeUIScreenshotPath[] = "screenshots";
    257 const char kChromeUIThemePath[] = "theme";
    258 
    259 #if defined(ENABLE_FULL_PRINTING)
    260 const char kChromeUIPrintHost[] = "print";
    261 #endif  // ENABLE_FULL_PRINTING
    262 
    263 #if defined(OS_ANDROID)
    264 const char kChromeUIWelcomeHost[] = "welcome";
    265 #endif
    266 
    267 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
    268 const char kChromeUILinuxProxyConfigHost[] = "linux-proxy-config";
    269 const char kChromeUISandboxHost[] = "sandbox";
    270 #endif
    271 
    272 #if defined(OS_CHROMEOS)
    273 const char kChromeUIActivationMessageHost[] = "activationmessage";
    274 const char kChromeUIAppLaunchHost[] = "app-launch";
    275 const char kChromeUIBluetoothPairingHost[] = "bluetooth-pairing";
    276 const char kChromeUICertificateManagerHost[] = "certificate-manager";
    277 const char kChromeUIChargerReplacementHost[] = "charger-replacement";
    278 const char kChromeUIChooseMobileNetworkHost[] = "choose-mobile-network";
    279 const char kChromeUICryptohomeHost[] = "cryptohome";
    280 const char kChromeUIDiscardsHost[] = "discards";
    281 const char kChromeUIFirstRunHost[] = "first-run";
    282 const char kChromeUIIdleLogoutDialogHost[] = "idle-logout";
    283 const char kChromeUIImageBurnerHost[] = "imageburner";
    284 const char kChromeUIKeyboardOverlayHost[] = "keyboardoverlay";
    285 const char kChromeUILockScreenHost[] = "lock";
    286 const char kChromeUILoginContainerHost[] = "login-container";
    287 const char kChromeUILoginHost[] = "login";
    288 const char kChromeUIMediaplayerHost[] = "mediaplayer";
    289 const char kChromeUIMobileSetupHost[] = "mobilesetup";
    290 const char kChromeUINfcDebugHost[] = "nfc-debug";
    291 const char kChromeUINetworkHost[] = "network";
    292 const char kChromeUIOobeHost[] = "oobe";
    293 const char kChromeUIOSCreditsHost[] = "os-credits";
    294 const char kChromeUIPowerHost[] = "power";
    295 const char kChromeUIProvidedFileSystemsHost[] = "provided-file-systems";
    296 const char kChromeUIProxySettingsHost[] = "proxy-settings";
    297 const char kChromeUIRotateHost[] = "rotate";
    298 const char kChromeUIScreenlockIconHost[] = "screenlock-icon";
    299 const char kChromeUISetTimeHost[] = "set-time";
    300 const char kChromeUISimUnlockHost[] = "sim-unlock";
    301 const char kChromeUISlideshowHost[] = "slideshow";
    302 const char kChromeUISlowHost[] = "slow";
    303 const char kChromeUISlowTraceHost[] = "slow_trace";
    304 const char kChromeUIUserImageHost[] = "userimage";
    305 
    306 const char kChromeUIMenu[] = "menu";
    307 const char kChromeUINetworkMenu[] = "network-menu";
    308 const char kChromeUIWrenchMenu[] = "wrench-menu";
    309 
    310 const char kEULAPathFormat[] = "/usr/share/chromeos-assets/eula/%s/eula.html";
    311 const char kOemEulaURLPath[] = "oem";
    312 const char kOnlineEulaURLPath[] =
    313     "https://www.google.com/intl/%s/chrome/eula_text.html";
    314 #endif
    315 
    316 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA)
    317 const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog";
    318 #endif
    319 
    320 #if defined(ENABLE_WEBRTC)
    321 const char kChromeUIWebRtcLogsHost[] = "webrtc-logs";
    322 #endif
    323 
    324 // Option sub pages.
    325 // Add sub page paths to kChromeSettingsSubPages in builtin_provider.cc to be
    326 // listed by the built-in AutocompleteProvider.
    327 const char kAutofillSubPage[] = "autofill";
    328 const char kClearBrowserDataSubPage[] = "clearBrowserData";
    329 const char kContentSettingsExceptionsSubPage[] = "contentExceptions";
    330 const char kContentSettingsSubPage[] = "content";
    331 const char kCreateProfileSubPage[] = "createProfile";
    332 const char kExtensionsSubPage[] = "extensions";
    333 const char kHandlerSettingsSubPage[] = "handlers";
    334 const char kImportDataSubPage[] = "importData";
    335 const char kLanguageOptionsSubPage[] = "languages";
    336 const char kManageProfileSubPage[] = "manageProfile";
    337 const char kPasswordManagerSubPage[] = "passwords";
    338 const char kResetProfileSettingsSubPage[] = "resetProfileSettings";
    339 const char kSearchEnginesSubPage[] = "searchEngines";
    340 const char kSearchSubPage[] = "search";
    341 const char kSearchUsersSubPage[] = "search#Users";
    342 const char kSupervisedUserSettingsSubPage[] = "managedUser";
    343 const char kSyncSetupSubPage[] = "syncSetup";
    344 #if defined(OS_CHROMEOS)
    345 const char kInternetOptionsSubPage[] = "internet";
    346 const char kBluetoothAddDeviceSubPage[] = "bluetooth";
    347 const char kChangeProfilePictureSubPage[] = "changePicture";
    348 #endif
    349 
    350 // Extension sub pages.
    351 const char kExtensionConfigureCommandsSubPage[] = "configureCommands";
    352 
    353 const char kExtensionInvalidRequestURL[] = "chrome-extension://invalid/";
    354 const char kExtensionResourceInvalidRequestURL[] =
    355     "chrome-extension-resource://invalid/";
    356 
    357 const char kSyncGoogleDashboardURL[] =
    358     "https://www.google.com/settings/chrome/sync/";
    359 
    360 const char kAutoPasswordGenerationLearnMoreURL[] =
    361     "https://support.google.com/chrome/?p=ui_generate_password";
    362 
    363 const char kPasswordManagerLearnMoreURL[] =
    364 #if defined(OS_CHROMEOS)
    365     "https://support.google.com/chromeos/?p=settings_password";
    366 #else
    367     "https://support.google.com/chrome/?p=settings_password";
    368 #endif
    369 
    370 const char kPasswordManagerAccountDashboardURL[] =
    371     "https://passwords.google.com/settings/passwords";
    372 
    373 const char kExtensionControlledSettingLearnMoreURL[] =
    374     "https://support.google.com/chrome/?p=ui_settings_api_extension";
    375 
    376 const char kChromeHelpViaKeyboardURL[] =
    377 #if defined(OS_CHROMEOS)
    378 #if defined(OFFICIAL_BUILD)
    379     "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html";
    380 #else
    381     "https://support.google.com/chromeos/?p=help&ctx=keyboard";
    382 #endif  // defined(OFFICIAL_BUILD
    383 #else
    384     "https://support.google.com/chrome/?p=help&ctx=keyboard";
    385 #endif  // defined(OS_CHROMEOS)
    386 
    387 const char kChromeHelpViaMenuURL[] =
    388 #if defined(OS_CHROMEOS)
    389 #if defined(OFFICIAL_BUILD)
    390     "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html";
    391 #else
    392     "https://support.google.com/chromeos/?p=help&ctx=menu";
    393 #endif  // defined(OFFICIAL_BUILD
    394 #else
    395     "https://support.google.com/chrome/?p=help&ctx=menu";
    396 #endif  // defined(OS_CHROMEOS)
    397 
    398 const char kChromeHelpViaWebUIURL[] =
    399 #if defined(OS_CHROMEOS)
    400 #if defined(OFFICIAL_BUILD)
    401     "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html";
    402 #else
    403     "https://support.google.com/chromeos/?p=help&ctx=settings";
    404 #endif  // defined(OFFICIAL_BUILD
    405 #else
    406     "https://support.google.com/chrome/?p=help&ctx=settings";
    407 #endif  // defined(OS_CHROMEOS)
    408 
    409 #if defined(OS_CHROMEOS)
    410 const char kChromeAccessibilityHelpURL[] =
    411     "https://support.google.com/chromeos/?p=accessibility_menu";
    412 const char kChromeAccessibilitySettingsURL[] =
    413     "/chromevox/background/options.html";
    414 #endif  // defined(OS_CHROMEOS)
    415 
    416 #if defined(ENABLE_ONE_CLICK_SIGNIN)
    417 const char kChromeSyncLearnMoreURL[] =
    418     "http://support.google.com/chrome/bin/answer.py?answer=165139";
    419 
    420 const char kChromeSyncMergeTroubleshootingURL[] =
    421     "https://support.google.com/chrome/answer/1181420#merge";
    422 #endif  // defined(ENABLE_ONE_CLICK_SIGNIN)
    423 
    424 const char kChromeEnterpriseSignInLearnMoreURL[] =
    425   "http://support.google.com/chromeos/bin/answer.py?hl=en&answer=1331549";
    426 
    427 const char kResetProfileSettingsLearnMoreURL[] =
    428     "https://support.google.com/chrome/?p=ui_reset_settings";
    429 
    430 const char kAutomaticSettingsResetLearnMoreURL[] =
    431     "https://support.google.com/chrome/?p=ui_automatic_settings_reset";
    432 
    433 const char kSupervisedUserManagementURL[] = "https://www.chrome.com/manage";
    434 
    435 const char kSupervisedUserManagementDisplayURL[] = "www.chrome.com/manage";
    436 
    437 const char kSettingsSearchHelpURL[] =
    438 #if defined(OS_CHROMEOS)
    439     "https://support.google.com/chromeos/?p=settings_search_help";
    440 #else
    441     "https://support.google.com/chrome/?p=settings_search_help";
    442 #endif
    443 
    444 const char kOmniboxLearnMoreURL[] =
    445 #if defined(OS_CHROMEOS)
    446     "https://support.google.com/chromeos/?p=settings_omnibox";
    447 #else
    448     "https://support.google.com/chrome/?p=settings_omnibox";
    449 #endif
    450 
    451 const char kPageInfoHelpCenterURL[] =
    452 #if defined(OS_CHROMEOS)
    453     "https://support.google.com/chromeos/?p=ui_security_indicator";
    454 #else
    455     "https://support.google.com/chrome/?p=ui_security_indicator";
    456 #endif
    457 
    458 const char kCrashReasonURL[] =
    459 #if defined(OS_CHROMEOS)
    460     "https://support.google.com/chromeos/?p=e_awsnap";
    461 #else
    462     "https://support.google.com/chrome/?p=e_awsnap";
    463 #endif
    464 
    465 const char kKillReasonURL[] =
    466 #if defined(OS_CHROMEOS)
    467     "https://support.google.com/chromeos/?p=e_deadjim";
    468 #else
    469     "https://support.google.com/chrome/?p=e_deadjim";
    470 #endif
    471 
    472 const char kPrivacyLearnMoreURL[] =
    473 #if defined(OS_CHROMEOS)
    474     "https://support.google.com/chromeos/?p=settings_privacy";
    475 #else
    476     "https://support.google.com/chrome/?p=settings_privacy";
    477 #endif
    478 
    479 const char kDoNotTrackLearnMoreURL[] =
    480 #if defined(OS_CHROMEOS)
    481     "https://support.google.com/chromeos/?p=settings_do_not_track";
    482 #else
    483     "https://support.google.com/chrome/?p=settings_do_not_track";
    484 #endif
    485 
    486 #if defined(OS_CHROMEOS)
    487 const char kAttestationForContentProtectionLearnMoreURL[] =
    488     "https://support.google.com/chromebook/?p=verified_access";
    489 
    490 const char kEnhancedPlaybackNotificationLearnMoreURL[] =
    491     "https://support.google.com/chromebook/?p=enhanced_playback";
    492 #endif
    493 
    494 const char kChromiumProjectURL[] = "http://www.chromium.org/";
    495 
    496 const char kLearnMoreReportingURL[] =
    497     "https://support.google.com/chrome/?p=ui_usagestat";
    498 
    499 const char kOutdatedPluginLearnMoreURL[] =
    500     "https://support.google.com/chrome/?p=ib_outdated_plugin";
    501 
    502 const char kBlockedPluginLearnMoreURL[] =
    503     "https://support.google.com/chrome/?p=ib_blocked_plugin";
    504 
    505 const char kHotwordLearnMoreURL[] =
    506     "https://support.google.com/chrome/?p=ui_hotword_search";
    507 
    508 const char kLearnMoreRegisterProtocolHandlerURL[] =
    509     "https://support.google.com/chrome/?p=ib_protocol_handler";
    510 
    511 const char kSyncLearnMoreURL[] =
    512     "https://support.google.com/chrome/?p=settings_sign_in";
    513 
    514 const char kDownloadScanningLearnMoreURL[] =
    515     "https://support.google.com/chrome/?p=ib_download_blocked";
    516 
    517 const char kDownloadInterruptedLearnMoreURL[] =
    518     "https://support.google.com/chrome/?p=ui_download_errors";
    519 
    520 const char kSyncEverythingLearnMoreURL[] =
    521     "https://support.google.com/chrome/?p=settings_sync_all";
    522 
    523 const char kCloudPrintLearnMoreURL[] =
    524 #if defined(OS_CHROMEOS)
    525     "https://support.google.com/chromeos/?p=settings_cloud_print";
    526 #else
    527     "https://support.google.com/chrome/?p=settings_cloud_print";
    528 #endif
    529 
    530 const char kCloudPrintNoDestinationsLearnMoreURL[] =
    531     "https://www.google.com/cloudprint/learn/";
    532 
    533 const char kAppLauncherHelpURL[] =
    534     "https://support.google.com/chrome_webstore/?p=cws_app_launcher";
    535 
    536 const char kSyncEncryptionHelpURL[] =
    537 #if defined(OS_CHROMEOS)
    538     "https://support.google.com/chromeos/?p=settings_encryption";
    539 #else
    540     "https://support.google.com/chrome/?p=settings_encryption";
    541 #endif
    542 
    543 const char kSyncErrorsHelpURL[] =
    544     "https://support.google.com/chrome/?p=settings_sync_error";
    545 
    546 #if defined(OS_CHROMEOS)
    547 const char kNaturalScrollHelpURL[] =
    548     "https://support.google.com/chromeos/?p=simple_scrolling";
    549 #endif
    550 
    551 #if defined(OS_CHROMEOS)
    552 const char kLearnMoreEnterpriseURL[] =
    553     "https://support.google.com/chromeos/bin/answer.py?answer=2535613";
    554 #endif
    555 
    556 const char kRemoveNonCWSExtensionURL[] =
    557     "https://support.google.com/chrome/answer/2811969?"
    558     "p=ui_remove_non_cws_extensions&rd=1";
    559 
    560 const char kNotificationsHelpURL[] =
    561     "https://support.google.com/chrome/?p=ui_notifications";
    562 
    563 const char kNotificationWelcomeLearnMoreURL[] =
    564     "https://support.google.com/chrome/?p=ib_google_now_welcome";
    565 
    566 // Add hosts here to be included in chrome://chrome-urls (about:about).
    567 // These hosts will also be suggested by BuiltinProvider.
    568 const char* const kChromeHostURLs[] = {
    569   kChromeUICacheHost,
    570   kChromeUIChromeURLsHost,
    571   kChromeUIComponentsHost,
    572   kChromeUICrashesHost,
    573   kChromeUICreditsHost,
    574   kChromeUIDNSHost,
    575   kChromeUIFlagsHost,
    576   kChromeUIHistoryHost,
    577   kChromeUIInvalidationsHost,
    578   kChromeUIMemoryHost,
    579   kChromeUIMemoryInternalsHost,
    580   kChromeUINetInternalsHost,
    581   kChromeUINewTabHost,
    582   kChromeUIOmniboxHost,
    583   kChromeUIPasswordManagerInternalsHost,
    584   kChromeUIPredictorsHost,
    585   kChromeUIProfilerHost,
    586   kChromeUISignInInternalsHost,
    587   kChromeUIStatsHost,
    588   kChromeUISuggestionsHost,
    589   kChromeUISyncInternalsHost,
    590   kChromeUITermsHost,
    591   kChromeUIThumbnailListHost,
    592   kChromeUITranslateInternalsHost,
    593   kChromeUIUserActionsHost,
    594   kChromeUIVersionHost,
    595   kChromeUIVoiceSearchHost,
    596   content::kChromeUIAccessibilityHost,
    597   content::kChromeUIAppCacheInternalsHost,
    598   content::kChromeUIBlobInternalsHost,
    599   content::kChromeUIGpuHost,
    600   content::kChromeUIHistogramHost,
    601   content::kChromeUIIndexedDBInternalsHost,
    602   content::kChromeUIMediaInternalsHost,
    603   content::kChromeUINetworkViewCacheHost,
    604   content::kChromeUIServiceWorkerInternalsHost,
    605   content::kChromeUITracingHost,
    606   content::kChromeUIWebRTCInternalsHost,
    607 #if defined(OS_ANDROID)
    608   kChromeUIWelcomeHost,
    609 #else
    610   kChromeUIAppLauncherPageHost,
    611   kChromeUIBookmarksHost,
    612   kChromeUIDownloadsHost,
    613   kChromeUIFlashHost,
    614   kChromeUIGCMInternalsHost,
    615   kChromeUIHelpHost,
    616   kChromeUIInspectHost,
    617   kChromeUIIPCHost,
    618   kChromeUIPluginsHost,
    619   kChromeUIQuotaInternalsHost,
    620   kChromeUISettingsHost,
    621   kChromeUISystemInfoHost,
    622   kChromeUIUberHost,
    623 #endif
    624 #if defined(OS_ANDROID) || defined(OS_IOS)
    625   kChromeUINetExportHost,
    626 #endif
    627 #if defined(OS_CHROMEOS)
    628   kChromeUICertificateManagerHost,
    629   kChromeUIChooseMobileNetworkHost,
    630   kChromeUICryptohomeHost,
    631   kChromeUIDiscardsHost,
    632   kChromeUIDriveInternalsHost,
    633   kChromeUIFirstRunHost,
    634   kChromeUIImageBurnerHost,
    635   kChromeUIKeyboardOverlayHost,
    636   kChromeUILoginHost,
    637   kChromeUINetworkHost,
    638   kChromeUIOobeHost,
    639   kChromeUIOSCreditsHost,
    640   kChromeUIPowerHost,
    641   kChromeUIProxySettingsHost,
    642   kChromeUITaskManagerHost,
    643 #endif
    644 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
    645   kChromeUILinuxProxyConfigHost,
    646   kChromeUISandboxHost,
    647 #endif
    648 #if defined(OS_WIN)
    649   kChromeUIConflictsHost,
    650 #endif
    651 #if !defined(DISABLE_NACL)
    652   kChromeUINaClHost,
    653 #endif
    654 #if defined(ENABLE_CONFIGURATION_POLICY)
    655   kChromeUIPolicyHost,
    656 #endif
    657 #if defined(ENABLE_EXTENSIONS)
    658   kChromeUIExtensionsHost,
    659 #endif
    660 #if defined(ENABLE_FULL_PRINTING)
    661   kChromeUIPrintHost,
    662 #endif
    663 #if defined(ENABLE_SERVICE_DISCOVERY)
    664   kChromeUIDevicesHost,
    665 #endif
    666 #if defined(ENABLE_WEBRTC)
    667   kChromeUIWebRtcLogsHost,
    668 #endif
    669 };
    670 const size_t kNumberOfChromeHostURLs = arraysize(kChromeHostURLs);
    671 
    672 const char* const kChromeDebugURLs[] = {
    673   content::kChromeUICrashURL,
    674   content::kChromeUIDumpURL,
    675   content::kChromeUIKillURL,
    676   content::kChromeUIHangURL,
    677   content::kChromeUIShorthangURL,
    678   content::kChromeUIGpuCleanURL,
    679   content::kChromeUIGpuCrashURL,
    680   content::kChromeUIGpuHangURL,
    681   content::kChromeUIPpapiFlashCrashURL,
    682   content::kChromeUIPpapiFlashHangURL,
    683   chrome::kChromeUIQuitURL,
    684   chrome::kChromeUIRestartURL
    685 };
    686 const int kNumberOfChromeDebugURLs =
    687     static_cast<int>(arraysize(kChromeDebugURLs));
    688 
    689 const char kChromeNativeScheme[] = "chrome-native";
    690 
    691 const char kChromeSearchScheme[] = "chrome-search";
    692 const char kChromeSearchLocalNtpHost[] = "local-ntp";
    693 const char kChromeSearchLocalNtpUrl[] =
    694     "chrome-search://local-ntp/local-ntp.html";
    695 const char kChromeSearchRemoteNtpHost[] = "remote-ntp";
    696 
    697 const char kChromeSearchMostVisitedHost[] = "most-visited";
    698 const char kChromeSearchMostVisitedUrl[] = "chrome-search://most-visited/";
    699 
    700 // Google SafeSearch query parameters.
    701 const char kSafeSearchSafeParameter[] = "safe=active";
    702 const char kSafeSearchSsuiParameter[] = "ssui=on";
    703 
    704 const char kMediaAccessLearnMoreUrl[] =
    705     "https://support.google.com/chrome/?p=ib_access_cam_mic";
    706 
    707 const char kLanguageSettingsLearnMoreUrl[] =
    708 #if defined(OS_CHROMEOS)
    709     "https://support.google.com/chromebook/answer/1059490";
    710 #else
    711     "https://support.google.com/chrome/topic/1678461";
    712 #endif
    713 
    714 #if defined(OS_MACOSX)
    715 const char kMac32BitDeprecationURL[] =
    716 #if !defined(ARCH_CPU_64_BITS)
    717     "https://support.google.com/chrome/?p=ui_mac_32bit_support";
    718 #else
    719     "";
    720 #endif
    721 #endif
    722 
    723 const char kEasyUnlockLearnMoreUrl[] =
    724     "https://support.google.com/chromebook/answer/6070209";
    725 
    726 }  // namespace chrome
    727