// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Contains constants for known URLs and portions thereof. // Except for WebUI UI/Host/SubPage constants. Those go in // chrome/common/webui_url_constants.h. // // - The constants are divided into sections: Cross platform, platform-specific, // and feature-specific. // - When adding platform/feature specific constants, if there already exists an // appropriate #if block, use that. // - Keep the constants sorted by name within its section. #ifndef CHROME_COMMON_URL_CONSTANTS_H_ #define CHROME_COMMON_URL_CONSTANTS_H_ #include #include "build/branding_buildflags.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/common/buildflags.h" #include "chrome/common/webui_url_constants.h" #include "content/public/common/url_constants.h" #include "net/net_buildflags.h" #include "ppapi/buildflags/buildflags.h" namespace chrome { // "Learn more" URL linked in the dialog to cast using a code. inline constexpr char kAccessCodeCastLearnMoreURL[] = "https://support.google.com/chrome/a/?p=cast_to_class_teacher"; // "Learn more" URL for accessibility image labels, linked from the permissions // dialog shown when a user enables the feature. inline constexpr char kAccessibilityLabelsLearnMoreURL[] = "https://support.google.com/chrome?p=image_descriptions"; // "Learn more" URL for Ad Privacy. inline constexpr char kAdPrivacyLearnMoreURL[] = "https://support.google.com/chrome?p=ad_privacy"; // "Learn more" URL for when profile settings are automatically reset. inline constexpr char kAutomaticSettingsResetLearnMoreURL[] = "https://support.google.com/chrome?p=ui_automatic_settings_reset"; // "Learn more" URL for Advanced Protection download warnings. inline constexpr char kAdvancedProtectionDownloadLearnMoreURL[] = "https://support.google.com/accounts/accounts?p=safe-browsing"; // "Chrome Settings" URL for website notifications linked out from OSSettings. inline constexpr char kAppNotificationsBrowserSettingsURL[] = "chrome://settings/content/notifications"; // "Learn more" URL for Battery Saver Mode. inline constexpr char kBatterySaverModeLearnMoreUrl[] = "https://support.google.com/chrome?p=chrome_battery_saver"; // The URL for providing help when the Bluetooth adapter is off. inline constexpr char kBluetoothAdapterOffHelpURL[] = "https://support.google.com/chrome?p=bluetooth"; // "Learn more" URL shown in the dialog to enable cloud services for Cast. inline constexpr char kCastCloudServicesHelpURL[] = "https://support.google.com/chromecast/?p=casting_cloud_services"; // The URL for the help center article to show when no Cast destination has been // found. inline constexpr char kCastNoDestinationFoundURL[] = "https://support.google.com/chromecast/?p=no_cast_destination"; // The URL for the WebHID API help center article. inline constexpr char kChooserHidOverviewUrl[] = "https://support.google.com/chrome?p=webhid"; // The URL for the Web Serial API help center article. inline constexpr char kChooserSerialOverviewUrl[] = "https://support.google.com/chrome?p=webserial"; // The URL for the WebUsb help center article. inline constexpr char kChooserUsbOverviewURL[] = "https://support.google.com/chrome?p=webusb"; // Link to the forum for Chrome Beta. inline constexpr char kChromeBetaForumURL[] = "https://support.google.com/chrome?p=beta_forum"; // The URL for the help center article to fix Chrome update problems. inline constexpr char16_t kChromeFixUpdateProblems[] = u"https://support.google.com/chrome?p=fix_chrome_updates"; // General help links for Chrome, opened using various actions. inline constexpr char kChromeHelpViaKeyboardURL[] = #if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html"; #else "https://support.google.com/chromebook?p=help&ctx=keyboard"; #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #else "https://support.google.com/chrome?p=help&ctx=keyboard"; #endif // BUILDFLAG(IS_CHROMEOS_ASH) inline constexpr char kChromeHelpViaMenuURL[] = #if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html"; #else "https://support.google.com/chromebook?p=help&ctx=menu"; #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #else "https://support.google.com/chrome?p=help&ctx=menu"; #endif // BUILDFLAG(IS_CHROMEOS_ASH) inline constexpr char kChromeHelpViaWebUIURL[] = "https://support.google.com/chrome?p=help&ctx=settings"; #if BUILDFLAG(IS_CHROMEOS_ASH) inline constexpr char kChromeOsHelpViaWebUIURL[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html"; #else "https://support.google.com/chromebook?p=help&ctx=settings"; #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_CHROMEOS_ASH) // The isolated-app: scheme is used for Isolated Web Apps. A public explainer // can be found here: https://github.com/reillyeon/isolated-web-apps inline constexpr char kIsolatedAppScheme[] = "isolated-app"; inline constexpr char16_t kIsolatedAppSchemeUtf16[] = u"isolated-app"; // The chrome-native: scheme is used show pages rendered with platform specific // widgets instead of using HTML. inline constexpr char kChromeNativeScheme[] = "chrome-native"; // The URL of safe section in Chrome page (https://www.google.com/chrome). inline constexpr char16_t kChromeSafePageURL[] = u"https://www.google.com/chrome/#safe"; // Host and URL for most visited iframes used on the Instant Extended NTP. inline constexpr char kChromeSearchMostVisitedHost[] = "most-visited"; inline constexpr char kChromeSearchMostVisitedUrl[] = "chrome-search://most-visited/"; // URL for NTP custom background image selected from the user's machine and // filename for the version of the file in the Profile directory inline constexpr char kChromeUIUntrustedNewTabPageBackgroundUrl[] = "chrome-untrusted://new-tab-page/background.jpg"; inline constexpr char kChromeUIUntrustedNewTabPageBackgroundFilename[] = "background.jpg"; // Page under chrome-search. inline constexpr char kChromeSearchRemoteNtpHost[] = "remote-ntp"; // The chrome-search: scheme is served by the same backend as chrome:. However, // only specific URLDataSources are enabled to serve requests via the // chrome-search: scheme. See |InstantIOContext::ShouldServiceRequest| and its // callers for details. Note that WebUIBindings should never be granted to // chrome-search: pages. chrome-search: pages are displayable but not readable // by external search providers (that are rendered by Instant renderer // processes), and neither displayable nor readable by normal (non-Instant) web // pages. To summarize, a non-Instant process, when trying to access // 'chrome-search://something', will bump up against the following: // // 1. Renderer: The display-isolated check in WebKit will deny the request, // 2. Browser: Assuming they got by #1, the scheme checks in // URLDataSource::ShouldServiceRequest will deny the request, // 3. Browser: for specific sub-classes of URLDataSource, like ThemeSource // there are additional Instant-PID checks that make sure the request is // coming from a blessed Instant process, and deny the request. inline constexpr char kChromeSearchScheme[] = "chrome-search"; // This is the base URL of content that can be embedded in chrome://new-tab-page // using an