mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 11:57:48 -03:00
M112 part 5
This commit is contained in:
parent
f26f03aad3
commit
df3b227598
16 changed files with 776 additions and 919 deletions
File diff suppressed because it is too large
Load diff
|
@ -21,6 +21,7 @@
|
|||
#include "base/i18n/base_i18n_switches.h"
|
||||
#include "base/i18n/character_encoding.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/metrics/field_trial_params.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/no_destructor.h"
|
||||
|
@ -39,7 +40,6 @@
|
|||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
#include "chrome/browser/ash/crosapi/browser_util.h"
|
||||
#include "chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.h"
|
||||
#include "chrome/browser/browser_about_handler.h"
|
||||
#include "chrome/browser/browser_features.h"
|
||||
|
@ -250,6 +250,7 @@
|
|||
#include "components/safe_browsing/content/browser/browser_url_loader_throttle.h"
|
||||
#include "components/safe_browsing/content/browser/password_protection/password_protection_commit_deferring_condition.h"
|
||||
#include "components/safe_browsing/content/browser/safe_browsing_navigation_throttle.h"
|
||||
#include "components/safe_browsing/content/browser/ui_manager.h"
|
||||
#include "components/safe_browsing/core/browser/hashprefix_realtime/hash_realtime_service.h"
|
||||
#include "components/safe_browsing/core/browser/realtime/policy_engine.h"
|
||||
#include "components/safe_browsing/core/browser/realtime/url_lookup_service.h"
|
||||
|
@ -265,9 +266,11 @@
|
|||
#include "components/site_isolation/preloaded_isolated_origins.h"
|
||||
#include "components/site_isolation/site_isolation_policy.h"
|
||||
#include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h"
|
||||
#include "components/supervised_user/core/common/buildflags.h"
|
||||
#include "components/translate/core/common/translate_switches.h"
|
||||
#include "components/variations/variations_associated_data.h"
|
||||
#include "components/variations/variations_switches.h"
|
||||
#include "content/public/browser/attribution_data_model.h"
|
||||
#include "content/public/browser/browser_accessibility_state.h"
|
||||
#include "content/public/browser/browser_child_process_host.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
|
@ -281,6 +284,7 @@
|
|||
#include "content/public/browser/child_process_security_policy.h"
|
||||
#include "content/public/browser/client_certificate_delegate.h"
|
||||
#include "content/public/browser/file_url_loader.h"
|
||||
#include "content/public/browser/isolated_web_apps_policy.h"
|
||||
#include "content/public/browser/navigation_handle.h"
|
||||
#include "content/public/browser/navigation_throttle.h"
|
||||
#include "content/public/browser/overlay_window.h"
|
||||
|
@ -383,6 +387,7 @@
|
|||
#include "chrome/browser/ash/arc/fileapi/arc_content_file_system_backend_delegate.h"
|
||||
#include "chrome/browser/ash/arc/fileapi/arc_documents_provider_backend_delegate.h"
|
||||
#include "chrome/browser/ash/chrome_browser_main_parts_ash.h"
|
||||
#include "chrome/browser/ash/crosapi/browser_util.h"
|
||||
#include "chrome/browser/ash/drive/fileapi/drivefs_file_system_backend_delegate.h"
|
||||
#include "chrome/browser/ash/file_manager/app_id.h"
|
||||
#include "chrome/browser/ash/file_system_provider/fileapi/backend_delegate.h"
|
||||
|
@ -470,6 +475,7 @@
|
|||
#include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
|
||||
#include "chrome/browser/devtools/devtools_window.h"
|
||||
#include "chrome/browser/direct_sockets/chrome_direct_sockets_delegate.h"
|
||||
#include "chrome/browser/headless/chrome_browser_main_extra_parts_headless.h"
|
||||
#include "chrome/browser/media/unified_autoplay_config.h"
|
||||
#include "chrome/browser/new_tab_page/new_tab_page_util.h"
|
||||
#include "chrome/browser/page_info/about_this_site_side_panel_throttle.h"
|
||||
|
@ -577,7 +583,6 @@
|
|||
#include "chrome/browser/extensions/user_script_listener.h"
|
||||
#include "chrome/browser/speech/extension_api/tts_engine_extension_api.h"
|
||||
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
|
||||
#include "chrome/browser/web_applications/isolation_prefs_utils.h"
|
||||
#include "chrome/browser/web_applications/web_app_utils.h"
|
||||
#include "content/public/browser/site_isolation_policy.h"
|
||||
#include "extensions/browser/api/web_request/web_request_api.h"
|
||||
|
@ -715,6 +720,13 @@ using plugins::ChromeContentBrowserClientPluginsPart;
|
|||
|
||||
namespace {
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
// Provides the same functionality as kAllowlistedExtensionID.
|
||||
// TODO(b/204179234): Remove at the end of the deprecation period. Deprecated on
|
||||
// 10/2021.
|
||||
const char kDEPRECATED_AllowlistedExtensionID[] = "whitelisted-extension-id";
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN) && !defined(COMPONENT_BUILD) && \
|
||||
!defined(ADDRESS_SANITIZER)
|
||||
// Enables pre-launch Code Integrity Guard (CIG) for Chrome renderers, when
|
||||
|
@ -1755,6 +1767,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) {
|
|||
chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>());
|
||||
#endif
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
main_parts->AddParts(
|
||||
std::make_unique<headless::ChromeBrowserMainExtraPartsHeadless>());
|
||||
#endif
|
||||
|
||||
// Always add ChromeBrowserMainExtraPartsGpu last to make sure
|
||||
// GpuDataManager initialization could pick up about:flags settings.
|
||||
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsGpu>());
|
||||
|
@ -1815,27 +1832,14 @@ ChromeContentBrowserClient::GetStoragePartitionConfigForSite(
|
|||
|
||||
if (content::SiteIsolationPolicy::ShouldUrlUseApplicationIsolationLevel(
|
||||
browser_context, site)) {
|
||||
if (site.SchemeIs(chrome::kIsolatedAppScheme)) {
|
||||
const base::expected<web_app::IsolatedWebAppUrlInfo, std::string>
|
||||
iwa_url_info = web_app::IsolatedWebAppUrlInfo::Create(site);
|
||||
if (!iwa_url_info.has_value()) {
|
||||
LOG(ERROR) << "Invalid isolated-app URL: " << site;
|
||||
return default_storage_partition_config;
|
||||
}
|
||||
return iwa_url_info->storage_partition_config(browser_context);
|
||||
CHECK(site.SchemeIs(chrome::kIsolatedAppScheme));
|
||||
const base::expected<web_app::IsolatedWebAppUrlInfo, std::string>
|
||||
iwa_url_info = web_app::IsolatedWebAppUrlInfo::Create(site);
|
||||
if (!iwa_url_info.has_value()) {
|
||||
LOG(ERROR) << "Invalid isolated-app URL: " << site;
|
||||
return default_storage_partition_config;
|
||||
}
|
||||
|
||||
// TODO(crbug.com/1363756): Remove this path once IWAs are off HTTPS.
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
const std::string* isolation_key = web_app::GetStorageIsolationKey(
|
||||
profile->GetPrefs(), url::Origin::Create(site));
|
||||
CHECK(isolation_key);
|
||||
// |in_memory| and |partition_name| are only used in guest schemes, so they
|
||||
// are cleared here.
|
||||
return content::StoragePartitionConfig::Create(
|
||||
browser_context, *isolation_key,
|
||||
/*partition_name=*/std::string(),
|
||||
/*in_memory=*/false);
|
||||
return iwa_url_info->storage_partition_config(browser_context);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2458,25 +2462,19 @@ void ChromeContentBrowserClient::PersistIsolatedOrigin(
|
|||
|
||||
bool ChromeContentBrowserClient::ShouldUrlUseApplicationIsolationLevel(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& url,
|
||||
bool origin_matches_flag) {
|
||||
const GURL& url) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
if (!base::FeatureList::IsEnabled(features::kIsolatedWebApps)) {
|
||||
|
||||
if (!content::IsolatedWebAppsPolicy::AreIsolatedWebAppsEnabled(
|
||||
browser_context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (url.SchemeIs(chrome::kIsolatedAppScheme)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO(crbug.com/1363756): Remove the GetStorageIsolationKey call.
|
||||
return origin_matches_flag &&
|
||||
!!web_app::GetStorageIsolationKey(
|
||||
Profile::FromBrowserContext(browser_context)->GetPrefs(),
|
||||
url::Origin::Create(url));
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::IsIsolatedContextAllowedForUrl(
|
||||
|
@ -2702,21 +2700,10 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||
command_line->AppendSwitch(switches::kDisablePrintPreview);
|
||||
|
||||
// This passes the preference set by an enterprise policy on to a blink
|
||||
// switch so that we know whether to force WebSQL/WebSQL in non-secure
|
||||
// context to be enabled.
|
||||
// switch so that we know whether to force WebSQL to be enabled.
|
||||
if (prefs->GetBoolean(storage::kWebSQLAccess)) {
|
||||
command_line->AppendSwitch(blink::switches::kWebSQLAccess);
|
||||
}
|
||||
if (prefs->GetBoolean(storage::kWebSQLNonSecureContextEnabled)) {
|
||||
command_line->AppendSwitch(
|
||||
blink::switches::kWebSQLNonSecureContextEnabled);
|
||||
}
|
||||
|
||||
// Enable legacy quota API if enabled by enterprise policy.
|
||||
if (prefs->GetBoolean(storage::kPrefixedStorageInfoEnabled)) {
|
||||
command_line->AppendSwitch(
|
||||
blink::switches::kPrefixedStorageInfoEnabled);
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
InstantService* instant_service =
|
||||
|
@ -2834,6 +2821,11 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||
command_line->AppendSwitch(commerce::switches::kEnableChromeCart);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (content::IsolatedWebAppsPolicy::AreIsolatedWebAppsEnabled(
|
||||
process->GetBrowserContext())) {
|
||||
command_line->AppendSwitch(switches::kEnableIsolatedWebAppsInRenderer);
|
||||
}
|
||||
}
|
||||
|
||||
MaybeAppendBlinkSettingsSwitchForFieldTrial(browser_command_line,
|
||||
|
@ -2859,7 +2851,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||
extensions::switches::kExtensionsOnChromeURLs,
|
||||
extensions::switches::kSetExtensionThrottleTestParams, // For tests only.
|
||||
extensions::switches::kAllowlistedExtensionID,
|
||||
extensions::switches::kDEPRECATED_AllowlistedExtensionID,
|
||||
#endif
|
||||
switches::kAllowInsecureLocalhost,
|
||||
switches::kAppsGalleryURL,
|
||||
|
@ -2890,6 +2881,16 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||
translate::switches::kTranslateSecurityOrigin,
|
||||
};
|
||||
|
||||
// TODO(b/204179234): Remove after M114 (after ~Apr'23).
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
if (browser_command_line.HasSwitch(kDEPRECATED_AllowlistedExtensionID)) {
|
||||
LOG(FATAL) << "\"" << kDEPRECATED_AllowlistedExtensionID
|
||||
<< "\" switch is deprecated, please use \""
|
||||
<< extensions::switches::kAllowlistedExtensionID
|
||||
<< "\" instead";
|
||||
}
|
||||
#endif
|
||||
|
||||
command_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
} else if (process_type == switches::kUtilityProcess) {
|
||||
|
@ -2899,9 +2900,16 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||
extensions::switches::kEnableExperimentalExtensionApis,
|
||||
extensions::switches::kExtensionsOnChromeURLs,
|
||||
extensions::switches::kAllowlistedExtensionID,
|
||||
extensions::switches::kDEPRECATED_AllowlistedExtensionID,
|
||||
};
|
||||
|
||||
// TODO(b/204179234): Remove after M114 (after ~Apr'23).
|
||||
if (browser_command_line.HasSwitch(kDEPRECATED_AllowlistedExtensionID)) {
|
||||
LOG(FATAL) << "\"" << kDEPRECATED_AllowlistedExtensionID
|
||||
<< "\" switch is deprecated, please use \""
|
||||
<< extensions::switches::kAllowlistedExtensionID
|
||||
<< "\" instead";
|
||||
}
|
||||
|
||||
command_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
#endif
|
||||
|
@ -3307,6 +3315,7 @@ bool ChromeContentBrowserClient::IsInterestGroupAPIAllowed(
|
|||
bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
AttributionReportingOperation operation,
|
||||
content::RenderFrameHost* rfh,
|
||||
const url::Origin* source_origin,
|
||||
const url::Origin* destination_origin,
|
||||
const url::Origin* reporting_origin) {
|
||||
|
@ -3318,13 +3327,37 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed(
|
|||
return false;
|
||||
|
||||
switch (operation) {
|
||||
case AttributionReportingOperation::kSource:
|
||||
case AttributionReportingOperation::kSource: {
|
||||
DCHECK(source_origin);
|
||||
DCHECK(reporting_origin);
|
||||
bool allowed = privacy_sandbox_settings->IsAttributionReportingAllowed(
|
||||
*source_origin, *reporting_origin);
|
||||
if (rfh) {
|
||||
content_settings::PageSpecificContentSettings::BrowsingDataAccessed(
|
||||
rfh, content::AttributionDataModel::DataKey(*reporting_origin),
|
||||
BrowsingDataModel::StorageType::kAttributionReporting,
|
||||
/*blocked=*/!allowed);
|
||||
}
|
||||
return allowed;
|
||||
}
|
||||
case AttributionReportingOperation::kSourceVerboseDebugReport:
|
||||
DCHECK(source_origin);
|
||||
DCHECK(reporting_origin);
|
||||
return privacy_sandbox_settings->IsAttributionReportingAllowed(
|
||||
*source_origin, *reporting_origin);
|
||||
case AttributionReportingOperation::kTrigger:
|
||||
case AttributionReportingOperation::kTrigger: {
|
||||
DCHECK(destination_origin);
|
||||
DCHECK(reporting_origin);
|
||||
bool allowed = privacy_sandbox_settings->IsAttributionReportingAllowed(
|
||||
*destination_origin, *reporting_origin);
|
||||
if (rfh) {
|
||||
content_settings::PageSpecificContentSettings::BrowsingDataAccessed(
|
||||
rfh, content::AttributionDataModel::DataKey(*reporting_origin),
|
||||
BrowsingDataModel::StorageType::kAttributionReporting,
|
||||
/*blocked=*/!allowed);
|
||||
}
|
||||
return allowed;
|
||||
}
|
||||
case AttributionReportingOperation::kTriggerVerboseDebugReport:
|
||||
DCHECK(destination_origin);
|
||||
DCHECK(reporting_origin);
|
||||
|
@ -3354,7 +3387,7 @@ bool ChromeContentBrowserClient::IsSharedStorageAllowed(
|
|||
top_frame_origin, accessing_origin);
|
||||
if (rfh) {
|
||||
content_settings::PageSpecificContentSettings::BrowsingDataAccessed(
|
||||
rfh, blink::StorageKey(accessing_origin),
|
||||
rfh, blink::StorageKey::CreateFirstParty(accessing_origin),
|
||||
BrowsingDataModel::StorageType::kSharedStorage, !allowed);
|
||||
}
|
||||
return allowed;
|
||||
|
@ -3844,7 +3877,7 @@ ChromeContentBrowserClient::GetTtsControllerDelegate() {
|
|||
void ChromeContentBrowserClient::MaybeOverrideManifest(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
blink::mojom::ManifestPtr& manifest) {
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(render_frame_host->GetBrowserContext());
|
||||
auto* provider = web_app::WebAppProvider::GetForWebApps(profile);
|
||||
|
@ -5162,6 +5195,20 @@ ChromeContentBrowserClient::CreateScreenEnumerator() const {
|
|||
return std::make_unique<ChromeScreenEnumerator>();
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::EnforceSystemAudioEchoCancellation() {
|
||||
// TODO(b/270042522): This is a short term solution to enforce the system
|
||||
// audio cancellation and will be removed before Lacros is released. The
|
||||
// short term solution will not work on Lacros.
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) && defined(USE_CRAS)
|
||||
bool system_aec_enabled = false;
|
||||
ash::CrosSettings::Get()->GetBoolean(ash::kDeviceSystemAecEnabled,
|
||||
&system_aec_enabled);
|
||||
return system_aec_enabled;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
std::unique_ptr<content::DevToolsManagerDelegate>
|
||||
ChromeContentBrowserClient::CreateDevToolsManagerDelegate() {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
@ -5506,7 +5553,8 @@ void ChromeContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
|
|||
profile, content::ChildProcessHost::kInvalidUniqueID));
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(features::kIsolatedWebApps) &&
|
||||
if (content::IsolatedWebAppsPolicy::AreIsolatedWebAppsEnabled(
|
||||
browser_context) &&
|
||||
!browser_context->ShutdownStarted()) {
|
||||
// TODO(crbug.com/1365848): Only register the factory if we are already in
|
||||
// an isolated storage partition.
|
||||
|
@ -5545,7 +5593,8 @@ void ChromeContentBrowserClient::
|
|||
DCHECK(factories);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(features::kIsolatedWebApps) &&
|
||||
if (content::IsolatedWebAppsPolicy::AreIsolatedWebAppsEnabled(
|
||||
browser_context) &&
|
||||
!browser_context->ShutdownStarted()) {
|
||||
factories->emplace(
|
||||
chrome::kIsolatedAppScheme,
|
||||
|
@ -5781,14 +5830,16 @@ void ChromeContentBrowserClient::
|
|||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(features::kIsolatedWebApps)) {
|
||||
{
|
||||
content::BrowserContext* browser_context =
|
||||
content::RenderProcessHost::FromID(render_process_id)
|
||||
->GetBrowserContext();
|
||||
DCHECK(browser_context);
|
||||
if (!browser_context->ShutdownStarted()) {
|
||||
// TODO(crbug.com/1365848): Only register the factory if we are already in
|
||||
// an isolated storage partition.
|
||||
if (content::IsolatedWebAppsPolicy::AreIsolatedWebAppsEnabled(
|
||||
browser_context) &&
|
||||
!browser_context->ShutdownStarted()) {
|
||||
// TODO(crbug.com/1365848): Only register the factory if we are already
|
||||
// in an isolated storage partition.
|
||||
|
||||
if (frame_host != nullptr) {
|
||||
factories->emplace(
|
||||
|
@ -5938,8 +5989,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors(
|
|||
std::make_unique<SearchPrefetchURLLoaderInterceptor>(frame_tree_node_id));
|
||||
|
||||
if (base::FeatureList::IsEnabled(features::kHttpsFirstModeV2)) {
|
||||
interceptors.push_back(
|
||||
std::make_unique<HttpsUpgradesInterceptor>(frame_tree_node_id));
|
||||
auto https_upgrades_interceptor =
|
||||
HttpsUpgradesInterceptor::MaybeCreateInterceptor(frame_tree_node_id);
|
||||
if (https_upgrades_interceptor) {
|
||||
interceptors.push_back(std::move(https_upgrades_interceptor));
|
||||
}
|
||||
} else {
|
||||
interceptors.push_back(
|
||||
std::make_unique<HttpsOnlyModeUpgradeInterceptor>(frame_tree_node_id));
|
||||
|
@ -6855,12 +6909,12 @@ bool ChromeContentBrowserClient::ArePersistentMediaDeviceIDsAllowed(
|
|||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<url::Origin>& top_frame_origin) {
|
||||
// Persistent MediaDevice IDs are allowed if cookies are allowed.
|
||||
return CookieSettingsFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(browser_context))
|
||||
->IsFullCookieAccessAllowed(
|
||||
url, site_for_cookies, top_frame_origin,
|
||||
net::CookieSettingOverrides(),
|
||||
content_settings::CookieSettings::QueryReason::kSiteStorage);
|
||||
scoped_refptr<content_settings::CookieSettings> cookie_settings =
|
||||
CookieSettingsFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(browser_context));
|
||||
return cookie_settings->IsFullCookieAccessAllowed(
|
||||
url, site_for_cookies, top_frame_origin,
|
||||
cookie_settings->SettingOverridesForStorage());
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
|
@ -7347,6 +7401,8 @@ bool ChromeContentBrowserClient::OpenExternally(
|
|||
const GURL& url,
|
||||
WindowOpenDisposition disposition) {
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
const bool from_webui = opener->GetWebUI() != nullptr;
|
||||
|
||||
// If Lacros is the primary browser, we intercept requests from Ash WebUIs and
|
||||
// redirect them to Lacros via crosapi. This is to make window.open and <a
|
||||
// href target="_blank"> links in WebUIs (e.g. ChromeOS Settings app) open in
|
||||
|
@ -7357,9 +7413,8 @@ bool ChromeContentBrowserClient::OpenExternally(
|
|||
// with separately) as well as some existing links that currently must remain
|
||||
// in Ash.
|
||||
bool should_open_in_lacros =
|
||||
crosapi::lacros_startup_state::IsLacrosEnabled() &&
|
||||
from_webui && crosapi::lacros_startup_state::IsLacrosEnabled() &&
|
||||
crosapi::lacros_startup_state::IsLacrosPrimaryEnabled() &&
|
||||
opener->GetWebUI() != nullptr &&
|
||||
disposition != WindowOpenDisposition::NEW_POPUP &&
|
||||
!url.SchemeIs(content::kChromeDevToolsScheme) &&
|
||||
!url.SchemeIs(content::kChromeUIScheme) &&
|
||||
|
@ -7375,13 +7430,25 @@ bool ChromeContentBrowserClient::OpenExternally(
|
|||
return true;
|
||||
}
|
||||
|
||||
Profile* profile = Profile::FromBrowserContext(opener->GetBrowserContext());
|
||||
|
||||
// Handle capturing system apps directly, as otherwise an additional empty
|
||||
// browser window could be created.
|
||||
const absl::optional<ash::SystemWebAppType> capturing_system_app_type =
|
||||
ash::GetCapturingSystemAppForURL(profile, url);
|
||||
if (capturing_system_app_type) {
|
||||
ash::SystemAppLaunchParams swa_params;
|
||||
swa_params.url = url;
|
||||
ash::LaunchSystemWebAppAsync(profile, capturing_system_app_type.value(),
|
||||
swa_params);
|
||||
return true;
|
||||
}
|
||||
|
||||
// If Lacros is the only browser, we intercept any WebUI URLs that would be
|
||||
// opened in a regular browser window. We open these with the OsUrlHandler SWA
|
||||
// instead, which will load them in an app window.
|
||||
Profile* profile = Profile::FromBrowserContext(opener->GetBrowserContext());
|
||||
bool should_open_in_ash_app =
|
||||
!crosapi::browser_util::IsAshWebBrowserEnabled() &&
|
||||
opener->GetWebUI() != nullptr &&
|
||||
from_webui && !crosapi::browser_util::IsAshWebBrowserEnabled() &&
|
||||
// Terminal's tabs must remain in the Terminal SWA.
|
||||
!url.SchemeIs(content::kChromeUIUntrustedScheme) &&
|
||||
ChromeWebUIControllerFactory::GetInstance()->CanHandleUrl(url) &&
|
||||
|
@ -7397,7 +7464,8 @@ bool ChromeContentBrowserClient::OpenExternally(
|
|||
std::make_unique<apps::WindowInfo>(display_id));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -7445,6 +7513,21 @@ bool ChromeContentBrowserClient::IsFileSystemURLNavigationAllowed(
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::AreIsolatedWebAppsEnabled(
|
||||
content::BrowserContext* browser_context) {
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Check if the enterprise policy that regulates Isolated Web Apps force
|
||||
// installing is present. If it is there then the IWAs should be enabled.
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
const base::Value::List& isolated_web_apps =
|
||||
profile->GetPrefs()->GetList(prefs::kIsolatedWebAppInstallForceList);
|
||||
if (!isolated_web_apps.empty()) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return base::FeatureList::IsEnabled(features::kIsolatedWebApps);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
base::FilePath ChromeContentBrowserClient::GetChildProcessPath(
|
||||
int child_flags,
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
#include "chrome/browser/profiles/profile_metrics.h"
|
||||
#include "chrome/browser/profiles/profiles_state.h"
|
||||
#include "chrome/browser/repost_form_warning_controller.h"
|
||||
#include "chrome/browser/resource_coordinator/tab_load_tracker.h"
|
||||
#include "chrome/browser/search/search.h"
|
||||
#include "chrome/browser/sessions/app_session_service.h"
|
||||
#include "chrome/browser/sessions/app_session_service_factory.h"
|
||||
|
@ -1506,11 +1505,6 @@ std::unique_ptr<content::WebContents> Browser::SwapWebContents(
|
|||
new_view->TakeFallbackContentFrom(old_view);
|
||||
}
|
||||
|
||||
// TODO(crbug.com/836409): TabLoadTracker should not rely on being notified
|
||||
// directly about tab contents swaps.
|
||||
resource_coordinator::TabLoadTracker::Get()->SwapTabContents(
|
||||
old_contents, new_contents.get());
|
||||
|
||||
// Clear the task manager tag. The TabStripModel will associate its own task
|
||||
// manager tag.
|
||||
task_manager::WebContentsTags::ClearTag(new_contents.get());
|
||||
|
@ -1701,9 +1695,11 @@ void Browser::AddNewContents(
|
|||
// popups on other screens and retains fullscreen focus for exit accelerators.
|
||||
// Popups are activated when the opener exits fullscreen, which happens
|
||||
// immediately if the popup would overlap the fullscreen window.
|
||||
// Allow fullscreen-within-tab openers to open popups normally.
|
||||
NavigateParams::WindowAction window_action = NavigateParams::SHOW_WINDOW;
|
||||
if (disposition == WindowOpenDisposition::NEW_POPUP &&
|
||||
fullscreen_controller->IsFullscreenForTabOrPending(source)) {
|
||||
GetFullscreenState(source).target_mode ==
|
||||
content::FullscreenMode::kContent) {
|
||||
window_action = NavigateParams::SHOW_WINDOW_INACTIVE;
|
||||
fullscreen_controller->FullscreenTabOpeningPopup(source,
|
||||
new_contents.get());
|
||||
|
@ -2003,13 +1999,15 @@ void Browser::ExitFullscreenModeForTab(WebContents* web_contents) {
|
|||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
return IsFullscreenForTabOrPending(web_contents, /*display_id=*/nullptr);
|
||||
const content::FullscreenState state = GetFullscreenState(web_contents);
|
||||
return state.target_mode == content::FullscreenMode::kContent ||
|
||||
state.target_mode == content::FullscreenMode::kPseudoContent;
|
||||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents,
|
||||
int64_t* display_id) {
|
||||
return exclusive_access_manager_->fullscreen_controller()
|
||||
->IsFullscreenForTabOrPending(web_contents, display_id);
|
||||
content::FullscreenState Browser::GetFullscreenState(
|
||||
const WebContents* web_contents) const {
|
||||
return exclusive_access_manager_->fullscreen_controller()->GetFullscreenState(
|
||||
web_contents);
|
||||
}
|
||||
|
||||
blink::mojom::DisplayMode Browser::GetDisplayMode(
|
||||
|
@ -2117,6 +2115,12 @@ void Browser::RegisterProtocolHandler(
|
|||
window_->GetLocationBar()->UpdateContentSettingsIcons();
|
||||
}
|
||||
|
||||
if (registry->registration_mode() ==
|
||||
custom_handlers::RphRegistrationMode::kAutoAccept) {
|
||||
registry->OnAcceptRegisterProtocolHandler(handler);
|
||||
return;
|
||||
}
|
||||
|
||||
permissions::PermissionRequestManager* permission_request_manager =
|
||||
permissions::PermissionRequestManager::FromWebContents(web_contents);
|
||||
if (permission_request_manager) {
|
||||
|
@ -2308,6 +2312,10 @@ void Browser::URLStarredChanged(content::WebContents* web_contents,
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Browser, ZoomObserver implementation:
|
||||
|
||||
void Browser::OnZoomControllerDestroyed(zoom::ZoomController* zoom_controller) {
|
||||
// SetAsDelegate() takes care of removing the observers.
|
||||
}
|
||||
|
||||
void Browser::OnZoomChanged(
|
||||
const zoom::ZoomController::ZoomChangedEventData& data) {
|
||||
if (data.web_contents == tab_strip_model_->GetActiveWebContents()) {
|
||||
|
@ -2928,13 +2936,15 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
|||
->SetDelegate(delegate);
|
||||
translate::ContentTranslateDriver* content_translate_driver =
|
||||
ChromeTranslateClient::FromWebContents(web_contents)->translate_driver();
|
||||
zoom::ZoomController* zoom_controller =
|
||||
zoom::ZoomController::FromWebContents(web_contents);
|
||||
if (delegate) {
|
||||
zoom::ZoomController::FromWebContents(web_contents)->AddObserver(this);
|
||||
zoom_controller->AddObserver(this);
|
||||
content_translate_driver->AddTranslationObserver(this);
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->AddObserver(this);
|
||||
web_contents_collection_.StartObserving(web_contents);
|
||||
} else {
|
||||
zoom::ZoomController::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
zoom_controller->RemoveObserver(this);
|
||||
content_translate_driver->RemoveTranslationObserver(this);
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
web_contents_collection_.StopObserving(web_contents);
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "components/sessions/core/session_id.h"
|
||||
#include "components/translate/content/browser/content_translate_driver.h"
|
||||
#include "components/zoom/zoom_observer.h"
|
||||
#include "content/public/browser/fullscreen_types.h"
|
||||
#include "content/public/browser/page_navigator.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
|
@ -210,6 +211,9 @@ class Browser : public TabStripModelObserver,
|
|||
kDeskTemplate,
|
||||
};
|
||||
|
||||
// Represents whether a value was known to be explicitly specified.
|
||||
enum class ValueSpecified { kUnknown, kSpecified, kUnspecified };
|
||||
|
||||
// The default value for a browser's `restore_id` param.
|
||||
static constexpr int kDefaultRestoreId = 0;
|
||||
|
||||
|
@ -261,6 +265,11 @@ class Browser : public TabStripModelObserver,
|
|||
|
||||
// The bounds of the window to open.
|
||||
gfx::Rect initial_bounds;
|
||||
// Whether `initial_bounds.origin()` was explicitly specified, if known.
|
||||
// Used to disambiguate coordinate (0,0) from an unspecified location when
|
||||
// parameters originate from the JS Window.open() window features string,
|
||||
// e.g. window.open(... 'left=0,top=0,...') vs window.open(... 'popup,...').
|
||||
ValueSpecified initial_origin_specified = ValueSpecified::kUnknown;
|
||||
|
||||
// The workspace the window should open in, if the platform supports it.
|
||||
std::string initial_workspace;
|
||||
|
@ -907,8 +916,8 @@ class Browser : public TabStripModelObserver,
|
|||
void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
|
||||
bool IsFullscreenForTabOrPending(
|
||||
const content::WebContents* web_contents) override;
|
||||
bool IsFullscreenForTabOrPending(const content::WebContents* web_contents,
|
||||
int64_t* display_id) override;
|
||||
content::FullscreenState GetFullscreenState(
|
||||
const content::WebContents* web_contents) const override;
|
||||
blink::mojom::DisplayMode GetDisplayMode(
|
||||
const content::WebContents* web_contents) override;
|
||||
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
|
||||
|
@ -979,6 +988,8 @@ class Browser : public TabStripModelObserver,
|
|||
bool starred) override;
|
||||
|
||||
// Overridden from ZoomObserver:
|
||||
void OnZoomControllerDestroyed(
|
||||
zoom::ZoomController* zoom_controller) override;
|
||||
void OnZoomChanged(
|
||||
const zoom::ZoomController::ZoomChangedEventData& data) override;
|
||||
|
||||
|
@ -1180,10 +1191,7 @@ class Browser : public TabStripModelObserver,
|
|||
std::unique_ptr<ScopedProfileKeepAlive> profile_keep_alive_;
|
||||
|
||||
// This Browser's window.
|
||||
//
|
||||
// TODO(crbug.com/1298696): pixel_browser_tests breaks with MTECheckedPtr
|
||||
// enabled. Triage.
|
||||
raw_ptr<BrowserWindow, DegradeToNoOpWhenMTE> window_;
|
||||
raw_ptr<BrowserWindow> window_;
|
||||
|
||||
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
|
||||
std::unique_ptr<TabStripModel> const tab_strip_model_;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "base/command_line.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/metrics/user_metrics.h"
|
||||
|
@ -46,6 +47,7 @@
|
|||
#include "chrome/browser/sessions/tab_restore_service_factory.h"
|
||||
#include "chrome/browser/translate/chrome_translate_client.h"
|
||||
#include "chrome/browser/ui/accelerator_utils.h"
|
||||
#include "chrome/browser/ui/autofill/payments/iban_bubble_controller_impl.h"
|
||||
#include "chrome/browser/ui/autofill/payments/manage_migration_ui_controller.h"
|
||||
#include "chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl.h"
|
||||
#include "chrome/browser/ui/autofill/payments/save_card_bubble_controller_impl.h"
|
||||
|
@ -624,7 +626,8 @@ void ReloadBypassingCache(Browser* browser, WindowOpenDisposition disposition) {
|
|||
}
|
||||
|
||||
bool CanReload(const Browser* browser) {
|
||||
return browser && !browser->is_type_devtools();
|
||||
return browser && !browser->is_type_devtools() &&
|
||||
!browser->is_type_picture_in_picture();
|
||||
}
|
||||
|
||||
void Home(Browser* browser, WindowOpenDisposition disposition) {
|
||||
|
@ -1229,7 +1232,7 @@ bool MarkCurrentTabAsReadInReadLater(Browser* browser) {
|
|||
browser->tab_strip_model()->GetActiveWebContents();
|
||||
if (!model || !GetTabURLAndTitleToSave(web_contents, &url, &title))
|
||||
return false;
|
||||
const ReadingListEntry* entry = model->GetEntryByURL(url);
|
||||
scoped_refptr<const ReadingListEntry> entry = model->GetEntryByURL(url);
|
||||
// Mark current tab as read.
|
||||
if (entry && !entry->IsRead())
|
||||
model->SetReadStatusIfExists(url, true);
|
||||
|
@ -1244,7 +1247,7 @@ bool IsCurrentTabUnreadInReadLater(Browser* browser) {
|
|||
browser->tab_strip_model()->GetActiveWebContents();
|
||||
if (!model || !GetTabURLAndTitleToSave(web_contents, &url, &title))
|
||||
return false;
|
||||
const ReadingListEntry* entry = model->GetEntryByURL(url);
|
||||
scoped_refptr<const ReadingListEntry> entry = model->GetEntryByURL(url);
|
||||
return entry && !entry->IsRead();
|
||||
}
|
||||
|
||||
|
@ -1266,6 +1269,14 @@ void SaveCreditCard(Browser* browser) {
|
|||
controller->ReshowBubble();
|
||||
}
|
||||
|
||||
void SaveIBAN(Browser* browser) {
|
||||
WebContents* web_contents =
|
||||
browser->tab_strip_model()->GetActiveWebContents();
|
||||
autofill::IbanBubbleControllerImpl* controller =
|
||||
autofill::IbanBubbleControllerImpl::FromWebContents(web_contents);
|
||||
controller->ReshowBubble();
|
||||
}
|
||||
|
||||
void MigrateLocalCards(Browser* browser) {
|
||||
WebContents* web_contents =
|
||||
browser->tab_strip_model()->GetActiveWebContents();
|
||||
|
@ -1844,7 +1855,7 @@ void PromptToNameWindow(Browser* browser) {
|
|||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
void ToggleMultitaskMenu(Browser* browser) {
|
||||
DCHECK(chromeos::wm::features::IsFloatWindowEnabled());
|
||||
DCHECK(chromeos::wm::features::IsWindowLayoutMenuEnabled());
|
||||
browser->window()->ToggleMultitaskMenu();
|
||||
}
|
||||
#endif
|
||||
|
@ -1877,9 +1888,7 @@ bool ShouldInterceptChromeURLNavigationInIncognito(Browser* browser,
|
|||
.Resolve(chrome::kClearBrowserDataSubPage);
|
||||
|
||||
bool show_history_disclaimer_dialog =
|
||||
url == GURL(chrome::kChromeUIHistoryURL) &&
|
||||
base::FeatureList::IsEnabled(
|
||||
features::kUpdateHistoryEntryPointsInIncognito);
|
||||
url == GURL(chrome::kChromeUIHistoryURL);
|
||||
|
||||
return show_clear_browsing_data_dialog || show_history_disclaimer_dialog;
|
||||
}
|
||||
|
@ -1890,8 +1899,6 @@ void ProcessInterceptedChromeURLNavigationInIncognito(Browser* browser,
|
|||
.Resolve(chrome::kClearBrowserDataSubPage)) {
|
||||
ShowIncognitoClearBrowsingDataDialog(browser);
|
||||
} else if (url == GURL(chrome::kChromeUIHistoryURL)) {
|
||||
DCHECK(base::FeatureList::IsEnabled(
|
||||
features::kUpdateHistoryEntryPointsInIncognito));
|
||||
ShowIncognitoHistoryDisclaimerDialog(browser);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
|
|
|
@ -74,8 +74,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
|
|||
{ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT},
|
||||
{ui::VKEY_PRIOR, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN,
|
||||
IDC_MOVE_TAB_PREVIOUS},
|
||||
// {ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_EXIT},
|
||||
{ui::VKEY_Q, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN , IDC_EXIT},
|
||||
{ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_EXIT},
|
||||
{ui::VKEY_K, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_NEW_TAB_TO_RIGHT},
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
|
||||
// Control modifier is rarely used on Mac, so we allow it only in several
|
||||
|
|
|
@ -499,10 +499,7 @@ void ToolbarView::ShowIntentPickerBubble(
|
|||
initiating_origin, std::move(callback));
|
||||
}
|
||||
|
||||
void ToolbarView::ShowBookmarkBubble(
|
||||
const GURL& url,
|
||||
bool already_bookmarked,
|
||||
bookmarks::BookmarkBubbleObserver* observer) {
|
||||
void ToolbarView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
|
||||
views::View* const anchor_view = location_bar();
|
||||
PageActionIconView* const bookmark_star_icon =
|
||||
GetPageActionIconView(PageActionIconType::kBookmarkStar);
|
||||
|
@ -512,9 +509,9 @@ void ToolbarView::ShowBookmarkBubble(
|
|||
#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
delegate = std::make_unique<BookmarkBubbleSignInDelegate>(profile);
|
||||
#endif
|
||||
BookmarkBubbleView::ShowBubble(
|
||||
anchor_view, GetWebContents(), bookmark_star_icon, observer,
|
||||
std::move(delegate), profile, url, already_bookmarked);
|
||||
BookmarkBubbleView::ShowBubble(anchor_view, GetWebContents(),
|
||||
bookmark_star_icon, std::move(delegate),
|
||||
profile, url, already_bookmarked);
|
||||
}
|
||||
|
||||
ExtensionsToolbarButton* ToolbarView::GetExtensionsButton() const {
|
||||
|
|
|
@ -71,14 +71,6 @@ if (!is_chromeos_lacros) {
|
|||
]
|
||||
}
|
||||
|
||||
config("pdb_larger_than_4gb") {
|
||||
if (is_win) {
|
||||
# Increasing the PDB page size to allow PDBs larger than 4GB. Not all
|
||||
# tools can handle such large PDBs yet, so opt-in when needed.
|
||||
ldflags = [ "/pdbpagesize:8192" ]
|
||||
}
|
||||
}
|
||||
|
||||
# To add a unit test to this target, make a "unit_tests" source_set in your
|
||||
# component(it's important to use a source_set instead of a static library or
|
||||
# no tests will run) and add a reference here.You can add more than one unit
|
||||
|
@ -99,12 +91,11 @@ test("components_unittests") {
|
|||
"//build/config/fuchsia/test/fonts.shard.test-cml",
|
||||
"//build/config/fuchsia/test/mark_vmo_executable.shard.test-cml",
|
||||
"//build/config/fuchsia/test/network.shard.test-cml",
|
||||
"//build/config/fuchsia/test/present_view.shard.test-cml",
|
||||
"//third_party/fuchsia-sdk/sdk/pkg/vulkan/client.shard.cml",
|
||||
]
|
||||
}
|
||||
|
||||
configs += [ ":pdb_larger_than_4gb" ]
|
||||
|
||||
# Add only ":unit_tests" dependencies here.If your tests have dependencies
|
||||
#(this would at least include the component itself), they should be on the
|
||||
# test source set and not here.
|
||||
|
@ -160,6 +151,7 @@ test("components_unittests") {
|
|||
"//components/history/core/browser:unit_tests",
|
||||
"//components/history/metrics:unit_tests",
|
||||
"//components/image_fetcher/core:unit_tests",
|
||||
"//components/image_service:unit_tests",
|
||||
"//components/keyed_service/core:unit_tests",
|
||||
"//components/language/core/browser:unit_tests",
|
||||
"//components/language/core/common:unit_tests",
|
||||
|
@ -228,14 +220,12 @@ test("components_unittests") {
|
|||
"//components/subresource_filter/core/browser:unit_tests",
|
||||
"//components/subresource_filter/core/common:unit_tests",
|
||||
"//components/subresource_filter/tools:unit_tests",
|
||||
"//components/supervised_user/core/common:unit_tests",
|
||||
"//components/sync:unit_tests",
|
||||
"//components/sync_bookmarks:unit_tests",
|
||||
"//components/sync_device_info:unit_tests",
|
||||
"//components/sync_preferences:unit_tests",
|
||||
"//components/sync_user_events:unit_tests",
|
||||
"//components/system_media_controls:unit_tests",
|
||||
"//components/tab_count_metrics:unit_tests",
|
||||
"//components/test:run_all_unittests",
|
||||
"//components/translate/core/browser:unit_tests",
|
||||
"//components/translate/core/common:unit_tests",
|
||||
|
@ -259,7 +249,10 @@ test("components_unittests") {
|
|||
]
|
||||
|
||||
if (enable_supervised_users) {
|
||||
deps += [ "//components/supervised_user/core/browser:unit_tests" ]
|
||||
deps += [
|
||||
"//components/supervised_user/core/browser:unit_tests",
|
||||
"//components/supervised_user/core/common:unit_tests",
|
||||
]
|
||||
}
|
||||
|
||||
if (!is_ios) {
|
||||
|
@ -368,6 +361,7 @@ test("components_unittests") {
|
|||
"//components/heavy_ad_intervention:unit_tests",
|
||||
"//components/history/content/browser:unit_tests",
|
||||
"//components/history_clusters/core:unit_tests",
|
||||
"//components/history_clusters/ui:unit_tests",
|
||||
"//components/invalidation/impl:unit_tests",
|
||||
"//components/javascript_dialogs:unit_tests",
|
||||
"//components/js_injection/common:unit_tests",
|
||||
|
@ -554,6 +548,7 @@ test("components_unittests") {
|
|||
|
||||
if (!is_android) {
|
||||
deps += [ "//components/feedback:unit_tests" ]
|
||||
deps += [ "//components/feedback/redaction_tool:unit_tests" ]
|
||||
}
|
||||
|
||||
if (!is_android) {
|
||||
|
@ -607,7 +602,6 @@ test("components_unittests") {
|
|||
|
||||
if (is_win) {
|
||||
deps += [
|
||||
"//components/browser_watcher:unit_tests",
|
||||
"//components/stability_report:unit_tests",
|
||||
"//components/winhttp:unit_tests",
|
||||
]
|
||||
|
@ -1067,6 +1061,7 @@ if (is_android) {
|
|||
"//components/browser_ui/util/android:junit",
|
||||
"//components/browser_ui/webshare/android:junit",
|
||||
"//components/browser_ui/widget/android:junit",
|
||||
"//components/commerce/core/android:junit_tests",
|
||||
"//components/content_capture/android/junit:components_content_capture_junit_tests",
|
||||
"//components/crash/android:junit",
|
||||
"//components/download/network:junit",
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "base/base_paths.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/threading/scoped_blocking_call.h"
|
||||
#include "base/win/scoped_handle.h"
|
||||
|
|
|
@ -44,7 +44,6 @@ source_set("browser") {
|
|||
":for_content_tests", # See top of //content/BUILD.gn for why.
|
||||
"//content/app:*",
|
||||
"//content/public/browser:browser_sources",
|
||||
"//content/test/fuzzer:attribution_source_fuzzer",
|
||||
"//content/test/fuzzer:browser_accessibility_fuzzer",
|
||||
"//content/test/fuzzer:clipboard_host_mojolpm_fuzzer",
|
||||
"//content/test/fuzzer:first_party_set_parser_fuzzer_support",
|
||||
|
@ -127,6 +126,7 @@ source_set("browser") {
|
|||
"//content/browser/attribution_reporting:attribution_reporting_proto",
|
||||
"//content/browser/attribution_reporting:internals_mojo_bindings",
|
||||
"//content/browser/attribution_reporting:mojo_bindings",
|
||||
"//content/browser/attribution_reporting:store_source_result_mojom",
|
||||
"//content/browser/background_fetch:background_fetch_proto",
|
||||
"//content/browser/background_sync:background_sync_proto",
|
||||
"//content/browser/cache_storage:cache_storage_proto",
|
||||
|
@ -266,6 +266,7 @@ source_set("browser") {
|
|||
"//ui/base/ime/init",
|
||||
"//ui/color",
|
||||
"//ui/color:mixers",
|
||||
"//ui/compositor",
|
||||
"//ui/display",
|
||||
"//ui/display/types",
|
||||
"//ui/display/util",
|
||||
|
@ -311,6 +312,8 @@ source_set("browser") {
|
|||
"$target_gen_dir/devtools/protocol/background_service.h",
|
||||
"$target_gen_dir/devtools/protocol/browser.cc",
|
||||
"$target_gen_dir/devtools/protocol/browser.h",
|
||||
"$target_gen_dir/devtools/protocol/device_access.cc",
|
||||
"$target_gen_dir/devtools/protocol/device_access.h",
|
||||
"$target_gen_dir/devtools/protocol/dom.cc",
|
||||
"$target_gen_dir/devtools/protocol/dom.h",
|
||||
"$target_gen_dir/devtools/protocol/emulation.cc",
|
||||
|
@ -411,17 +414,21 @@ source_set("browser") {
|
|||
"attribution_reporting/aggregatable_attribution_utils.h",
|
||||
"attribution_reporting/aggregatable_histogram_contribution.cc",
|
||||
"attribution_reporting/aggregatable_histogram_contribution.h",
|
||||
"attribution_reporting/attribution_beacon_id.h",
|
||||
"attribution_reporting/attribution_config.cc",
|
||||
"attribution_reporting/attribution_config.h",
|
||||
"attribution_reporting/attribution_constants.h",
|
||||
"attribution_reporting/attribution_cookie_checker.h",
|
||||
"attribution_reporting/attribution_cookie_checker_impl.cc",
|
||||
"attribution_reporting/attribution_cookie_checker_impl.h",
|
||||
"attribution_reporting/attribution_data_host_manager.cc",
|
||||
"attribution_reporting/attribution_data_host_manager.h",
|
||||
"attribution_reporting/attribution_data_host_manager_impl.cc",
|
||||
"attribution_reporting/attribution_data_host_manager_impl.h",
|
||||
"attribution_reporting/attribution_debug_report.cc",
|
||||
"attribution_reporting/attribution_debug_report.h",
|
||||
"attribution_reporting/attribution_header_utils.cc",
|
||||
"attribution_reporting/attribution_header_utils.h",
|
||||
"attribution_reporting/attribution_features.cc",
|
||||
"attribution_reporting/attribution_features.h",
|
||||
"attribution_reporting/attribution_host.cc",
|
||||
"attribution_reporting/attribution_host.h",
|
||||
"attribution_reporting/attribution_info.cc",
|
||||
|
@ -446,8 +453,6 @@ source_set("browser") {
|
|||
"attribution_reporting/attribution_report_network_sender.cc",
|
||||
"attribution_reporting/attribution_report_network_sender.h",
|
||||
"attribution_reporting/attribution_report_sender.h",
|
||||
"attribution_reporting/attribution_source_type.cc",
|
||||
"attribution_reporting/attribution_source_type.h",
|
||||
"attribution_reporting/attribution_storage.cc",
|
||||
"attribution_reporting/attribution_storage.h",
|
||||
"attribution_reporting/attribution_storage_delegate.cc",
|
||||
|
@ -629,8 +634,6 @@ source_set("browser") {
|
|||
"browsing_data/clear_site_data_utils.cc",
|
||||
"browsing_data/conditional_cache_deletion_helper.cc",
|
||||
"browsing_data/conditional_cache_deletion_helper.h",
|
||||
"browsing_data/same_site_data_remover_impl.cc",
|
||||
"browsing_data/same_site_data_remover_impl.h",
|
||||
"browsing_data/storage_partition_code_cache_data_remover.cc",
|
||||
"browsing_data/storage_partition_code_cache_data_remover.h",
|
||||
"browsing_instance.cc",
|
||||
|
@ -746,6 +749,7 @@ source_set("browser") {
|
|||
"devtools/devtools_agent_host_impl.h",
|
||||
"devtools/devtools_background_services_context_impl.cc",
|
||||
"devtools/devtools_background_services_context_impl.h",
|
||||
"devtools/devtools_device_request_prompt_info.h",
|
||||
"devtools/devtools_http_handler.cc",
|
||||
"devtools/devtools_http_handler.h",
|
||||
"devtools/devtools_instrumentation.cc",
|
||||
|
@ -788,6 +792,8 @@ source_set("browser") {
|
|||
"devtools/protocol/background_service_handler.h",
|
||||
"devtools/protocol/browser_handler.cc",
|
||||
"devtools/protocol/browser_handler.h",
|
||||
"devtools/protocol/device_access_handler.cc",
|
||||
"devtools/protocol/device_access_handler.h",
|
||||
"devtools/protocol/devtools_domain_handler.cc",
|
||||
"devtools/protocol/devtools_domain_handler.h",
|
||||
"devtools/protocol/devtools_download_manager_delegate.cc",
|
||||
|
@ -1113,6 +1119,8 @@ source_set("browser") {
|
|||
"interest_group/auction_process_manager.h",
|
||||
"interest_group/auction_runner.cc",
|
||||
"interest_group/auction_runner.h",
|
||||
"interest_group/auction_shared_storage_host.cc",
|
||||
"interest_group/auction_shared_storage_host.h",
|
||||
"interest_group/auction_url_loader_factory_proxy.cc",
|
||||
"interest_group/auction_url_loader_factory_proxy.h",
|
||||
"interest_group/auction_worklet_manager.cc",
|
||||
|
@ -1426,8 +1434,6 @@ source_set("browser") {
|
|||
"preloading/prefetch/prefetch_document_manager.h",
|
||||
"preloading/prefetch/prefetch_features.cc",
|
||||
"preloading/prefetch/prefetch_features.h",
|
||||
"preloading/prefetch/prefetch_from_string_url_loader.cc",
|
||||
"preloading/prefetch/prefetch_from_string_url_loader.h",
|
||||
"preloading/prefetch/prefetch_metrics.cc",
|
||||
"preloading/prefetch/prefetch_network_context.cc",
|
||||
"preloading/prefetch/prefetch_network_context.h",
|
||||
|
@ -1453,15 +1459,16 @@ source_set("browser") {
|
|||
"preloading/prefetch/prefetch_type.h",
|
||||
"preloading/prefetch/prefetch_url_loader_interceptor.cc",
|
||||
"preloading/prefetch/prefetch_url_loader_interceptor.h",
|
||||
"preloading/prefetch/prefetched_mainframe_response_container.cc",
|
||||
"preloading/prefetch/prefetched_mainframe_response_container.h",
|
||||
"preloading/prefetch/proxy_lookup_client_impl.cc",
|
||||
"preloading/prefetch/proxy_lookup_client_impl.h",
|
||||
"preloading/prefetcher.cc",
|
||||
"preloading/prefetcher.h",
|
||||
"preloading/preloading.cc",
|
||||
"preloading/preloading.h",
|
||||
"preloading/preloading_attempt_impl.cc",
|
||||
"preloading/preloading_attempt_impl.h",
|
||||
"preloading/preloading_config.cc",
|
||||
"preloading/preloading_config.h",
|
||||
"preloading/preloading_data_impl.cc",
|
||||
"preloading/preloading_data_impl.h",
|
||||
"preloading/preloading_decider.cc",
|
||||
|
@ -1867,6 +1874,8 @@ source_set("browser") {
|
|||
"renderer_host/should_swap_browsing_instance.h",
|
||||
"renderer_host/stored_page.cc",
|
||||
"renderer_host/stored_page.h",
|
||||
"renderer_host/subframe_history_navigation_throttle.cc",
|
||||
"renderer_host/subframe_history_navigation_throttle.h",
|
||||
"renderer_host/text_input_manager.cc",
|
||||
"renderer_host/text_input_manager.h",
|
||||
"renderer_host/transient_allow_popup.cc",
|
||||
|
@ -1888,6 +1897,8 @@ source_set("browser") {
|
|||
"scheduler/browser_io_thread_delegate.h",
|
||||
"scheduler/browser_task_executor.cc",
|
||||
"scheduler/browser_task_executor.h",
|
||||
"scheduler/browser_task_priority.cc",
|
||||
"scheduler/browser_task_priority.h",
|
||||
"scheduler/browser_task_queues.cc",
|
||||
"scheduler/browser_task_queues.h",
|
||||
"scheduler/browser_ui_thread_scheduler.cc",
|
||||
|
@ -2122,7 +2133,8 @@ source_set("browser") {
|
|||
"utility_process_host_receiver_bindings.cc",
|
||||
"utility_sandbox_delegate.cc",
|
||||
"utility_sandbox_delegate.h",
|
||||
"video_capture_service.cc",
|
||||
"video_capture_service_impl.cc",
|
||||
"video_capture_service_impl.h",
|
||||
"wake_lock/wake_lock_context_host.cc",
|
||||
"wake_lock/wake_lock_context_host.h",
|
||||
"wake_lock/wake_lock_service_impl.cc",
|
||||
|
@ -2171,8 +2183,6 @@ source_set("browser") {
|
|||
"web_package/signed_exchange_loader.h",
|
||||
"web_package/signed_exchange_prefetch_handler.cc",
|
||||
"web_package/signed_exchange_prefetch_handler.h",
|
||||
"web_package/signed_exchange_prefetch_metric_recorder.cc",
|
||||
"web_package/signed_exchange_prefetch_metric_recorder.h",
|
||||
"web_package/signed_exchange_prologue.cc",
|
||||
"web_package/signed_exchange_prologue.h",
|
||||
"web_package/signed_exchange_reporter.cc",
|
||||
|
@ -2187,42 +2197,6 @@ source_set("browser") {
|
|||
"web_package/signed_exchange_utils.h",
|
||||
"web_package/subresource_web_bundle_navigation_info.cc",
|
||||
"web_package/subresource_web_bundle_navigation_info.h",
|
||||
"web_package/web_bundle_blob_data_source.cc",
|
||||
"web_package/web_bundle_blob_data_source.h",
|
||||
"web_package/web_bundle_handle.cc",
|
||||
"web_package/web_bundle_handle.h",
|
||||
"web_package/web_bundle_handle_tracker.cc",
|
||||
"web_package/web_bundle_handle_tracker.h",
|
||||
"web_package/web_bundle_interceptor_for_file.cc",
|
||||
"web_package/web_bundle_interceptor_for_file.h",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation.cc",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation.h",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation_from_file_or_from_trustable_file.cc",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation_from_file_or_from_trustable_file.h",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation_from_network.cc",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation_from_network.h",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation_with_existing_reader.cc",
|
||||
"web_package/web_bundle_interceptor_for_history_navigation_with_existing_reader.h",
|
||||
"web_package/web_bundle_interceptor_for_network.cc",
|
||||
"web_package/web_bundle_interceptor_for_network.h",
|
||||
"web_package/web_bundle_interceptor_for_tracked_navigation_from_file.cc",
|
||||
"web_package/web_bundle_interceptor_for_tracked_navigation_from_file.h",
|
||||
"web_package/web_bundle_interceptor_for_tracked_navigation_from_trustable_file_or_from_network.cc",
|
||||
"web_package/web_bundle_interceptor_for_tracked_navigation_from_trustable_file_or_from_network.h",
|
||||
"web_package/web_bundle_interceptor_for_trustable_file.cc",
|
||||
"web_package/web_bundle_interceptor_for_trustable_file.h",
|
||||
"web_package/web_bundle_navigation_info.cc",
|
||||
"web_package/web_bundle_navigation_info.h",
|
||||
"web_package/web_bundle_reader.cc",
|
||||
"web_package/web_bundle_reader.h",
|
||||
"web_package/web_bundle_redirect_url_loader.cc",
|
||||
"web_package/web_bundle_redirect_url_loader.h",
|
||||
"web_package/web_bundle_source.cc",
|
||||
"web_package/web_bundle_source.h",
|
||||
"web_package/web_bundle_url_loader_factory.cc",
|
||||
"web_package/web_bundle_url_loader_factory.h",
|
||||
"web_package/web_bundle_utils.cc",
|
||||
"web_package/web_bundle_utils.h",
|
||||
"web_ui_browser_interface_broker_registry.cc",
|
||||
"webauth/client_data_json.cc",
|
||||
"webauth/client_data_json.h",
|
||||
|
@ -2476,11 +2450,9 @@ source_set("browser") {
|
|||
"speech/tts_fuchsia.cc",
|
||||
]
|
||||
deps += [
|
||||
"//media/fuchsia/cdm/service",
|
||||
"//media/fuchsia/mojom:fuchsia_media",
|
||||
"//third_party/abseil-cpp:absl",
|
||||
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.accessibility.semantics",
|
||||
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mediacodec",
|
||||
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_hlcpp",
|
||||
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mediacodec:fuchsia.mediacodec_hlcpp",
|
||||
"//third_party/fuchsia-sdk/sdk/pkg/inspect",
|
||||
"//third_party/fuchsia-sdk/sdk/pkg/scenic_cpp",
|
||||
"//third_party/fuchsia-sdk/sdk/pkg/sys_inspect_cpp",
|
||||
|
@ -2597,6 +2569,20 @@ source_set("browser") {
|
|||
weak_frameworks = [
|
||||
"UniformTypeIdentifiers.framework", # macOS 11
|
||||
]
|
||||
} else if (is_ios) {
|
||||
sources += [
|
||||
"child_process_launcher_helper_ios.cc",
|
||||
"renderer_host/browser_compositor_ios.h",
|
||||
"renderer_host/browser_compositor_ios.mm",
|
||||
"renderer_host/delegated_frame_host_client_ios.cc",
|
||||
"renderer_host/delegated_frame_host_client_ios.h",
|
||||
"renderer_host/render_widget_host_view_ios.h",
|
||||
"renderer_host/render_widget_host_view_ios.mm",
|
||||
"web_contents/web_contents_view_ios.h",
|
||||
"web_contents/web_contents_view_ios.mm",
|
||||
]
|
||||
frameworks += [ "IOSurface.framework" ]
|
||||
deps += [ "//ui/accelerated_widget_mac" ]
|
||||
} else {
|
||||
# Not Mac.
|
||||
deps += [ "//sandbox" ]
|
||||
|
@ -2889,6 +2875,15 @@ source_set("browser") {
|
|||
configs += [ "//build/config/linux/pangocairo" ]
|
||||
}
|
||||
|
||||
if (is_ios) {
|
||||
sources += [
|
||||
"renderer_host/input/web_input_event_builders_ios.h",
|
||||
"renderer_host/input/web_input_event_builders_ios.mm",
|
||||
"renderer_host/native_web_keyboard_event_ios.mm",
|
||||
"speech/tts_ios.mm",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"accessibility/accessibility_tree_formatter_android.cc",
|
||||
|
@ -2999,6 +2994,9 @@ source_set("browser") {
|
|||
"android/web_contents_observer_proxy.h",
|
||||
"attribution_reporting/attribution_input_event_tracker_android.cc",
|
||||
"attribution_reporting/attribution_input_event_tracker_android.h",
|
||||
"attribution_reporting/attribution_os_level_manager.h",
|
||||
"attribution_reporting/attribution_os_level_manager_android.cc",
|
||||
"attribution_reporting/attribution_os_level_manager_android.h",
|
||||
"child_process_launcher_helper_android.cc",
|
||||
"contacts/contacts_provider_android.cc",
|
||||
"contacts/contacts_provider_android.h",
|
||||
|
@ -3069,6 +3067,7 @@ source_set("browser") {
|
|||
deps += [
|
||||
":reflection_jni_headers",
|
||||
"//build/config/freetype",
|
||||
"//cc/slim",
|
||||
"//components/tracing:graphics_provider",
|
||||
"//content/public/android:jni",
|
||||
"//device/gamepad/public/mojom",
|
||||
|
@ -3110,8 +3109,6 @@ source_set("browser") {
|
|||
# The Direct Sockets API is not implemented on Android.
|
||||
"direct_sockets/direct_sockets_service_impl.cc",
|
||||
"direct_sockets/direct_sockets_service_impl.h",
|
||||
"direct_sockets/resolve_host_and_open_socket.cc",
|
||||
"direct_sockets/resolve_host_and_open_socket.h",
|
||||
|
||||
# Non-Android platforms that don't presently support
|
||||
# enable_screen_capture, like Fuchsia, nevertheless compile
|
||||
|
@ -3211,7 +3208,7 @@ source_set("browser") {
|
|||
]
|
||||
}
|
||||
|
||||
if (use_aura || is_mac) {
|
||||
if (use_aura || is_apple) {
|
||||
sources += [
|
||||
"compositor/image_transport_factory.cc",
|
||||
"compositor/image_transport_factory.h",
|
||||
|
|
|
@ -188,8 +188,8 @@ void FileSystemAccessSafeMoveHelper::ComputeHashForSourceFile(
|
|||
return;
|
||||
}
|
||||
|
||||
auto wrapped_callback = base::BindPostTask(
|
||||
base::SequencedTaskRunner::GetCurrentDefault(), std::move(callback));
|
||||
auto wrapped_callback =
|
||||
base::BindPostTaskToCurrentDefault(std::move(callback));
|
||||
manager_->operation_runner().PostTaskWithThisObject(
|
||||
base::BindOnce(&HashCalculator::CreateAndStart,
|
||||
base::WrapRefCounted(manager_->context()),
|
||||
|
|
|
@ -92,7 +92,7 @@ class PepperFileIOHost : public ppapi::host::ResourceHost,
|
|||
void OnLocalFileOpened(ppapi::host::ReplyMessageContext reply_context,
|
||||
const base::FilePath& path,
|
||||
base::File::Error error_code);
|
||||
|
||||
|
||||
void SendFileOpenReply(ppapi::host::ReplyMessageContext reply_context,
|
||||
base::File::Error error_code);
|
||||
|
||||
|
|
|
@ -1,362 +0,0 @@
|
|||
// Copyright 2023 The Chromium Authors and Alex313031
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "net/base/features.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/feature_list.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
namespace net::features {
|
||||
|
||||
BASE_FEATURE(kAlpsForHttp2, "AlpsForHttp2", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kAvoidH2Reprioritization,
|
||||
"AvoidH2Reprioritization",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kCapReferrerToOriginOnCrossOrigin,
|
||||
"CapReferrerToOriginOnCrossOrigin",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kDnsTransactionDynamicTimeouts,
|
||||
"DnsTransactionDynamicTimeouts",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
const base::FeatureParam<double> kDnsTransactionTimeoutMultiplier{
|
||||
&kDnsTransactionDynamicTimeouts, "DnsTransactionTimeoutMultiplier", 7.5};
|
||||
|
||||
const base::FeatureParam<base::TimeDelta> kDnsMinTransactionTimeout{
|
||||
&kDnsTransactionDynamicTimeouts, "DnsMinTransactionTimeout",
|
||||
base::Seconds(12)};
|
||||
|
||||
BASE_FEATURE(kUseDnsHttpsSvcb,
|
||||
"UseDnsHttpsSvcb",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
const base::FeatureParam<bool> kUseDnsHttpsSvcbEnforceSecureResponse{
|
||||
&kUseDnsHttpsSvcb, "UseDnsHttpsSvcbEnforceSecureResponse", false};
|
||||
|
||||
const base::FeatureParam<base::TimeDelta> kUseDnsHttpsSvcbInsecureExtraTimeMax{
|
||||
&kUseDnsHttpsSvcb, "UseDnsHttpsSvcbInsecureExtraTimeMax",
|
||||
base::Milliseconds(50)};
|
||||
|
||||
const base::FeatureParam<int> kUseDnsHttpsSvcbInsecureExtraTimePercent{
|
||||
&kUseDnsHttpsSvcb, "UseDnsHttpsSvcbInsecureExtraTimePercent", 20};
|
||||
|
||||
const base::FeatureParam<base::TimeDelta> kUseDnsHttpsSvcbInsecureExtraTimeMin{
|
||||
&kUseDnsHttpsSvcb, "UseDnsHttpsSvcbInsecureExtraTimeMin",
|
||||
base::Milliseconds(5)};
|
||||
|
||||
const base::FeatureParam<base::TimeDelta> kUseDnsHttpsSvcbSecureExtraTimeMax{
|
||||
&kUseDnsHttpsSvcb, "UseDnsHttpsSvcbSecureExtraTimeMax",
|
||||
base::Milliseconds(50)};
|
||||
|
||||
const base::FeatureParam<int> kUseDnsHttpsSvcbSecureExtraTimePercent{
|
||||
&kUseDnsHttpsSvcb, "UseDnsHttpsSvcbSecureExtraTimePercent", 20};
|
||||
|
||||
const base::FeatureParam<base::TimeDelta> kUseDnsHttpsSvcbSecureExtraTimeMin{
|
||||
&kUseDnsHttpsSvcb, "UseDnsHttpsSvcbSecureExtraTimeMin",
|
||||
base::Milliseconds(5)};
|
||||
|
||||
BASE_FEATURE(kUseDnsHttpsSvcbAlpn,
|
||||
"UseDnsHttpsSvcbAlpn",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kEnableTLS13EarlyData,
|
||||
"EnableTLS13EarlyData",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kEncryptedClientHello,
|
||||
"EncryptedClientHello",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kNetworkQualityEstimator,
|
||||
"NetworkQualityEstimator",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kSplitCacheByIncludeCredentials,
|
||||
"SplitCacheByIncludeCredentials",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kSplitCacheByNetworkIsolationKey,
|
||||
"SplitCacheByNetworkIsolationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kSplitHostCacheByNetworkIsolationKey,
|
||||
"SplitHostCacheByNetworkIsolationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPartitionConnectionsByNetworkIsolationKey,
|
||||
"PartitionConnectionsByNetworkIsolationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kForceIsolationInfoFrameOriginToTopLevelFrame,
|
||||
"ForceIsolationInfoFrameOriginToTopLevelFrame",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPartitionHttpServerPropertiesByNetworkIsolationKey,
|
||||
"PartitionHttpServerPropertiesByNetworkIsolationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPartitionSSLSessionsByNetworkIsolationKey,
|
||||
"PartitionSSLSessionsByNetworkIsolationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPartitionNelAndReportingByNetworkIsolationKey,
|
||||
"PartitionNelAndReportingByNetworkIsolationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kEnableDoubleKeyNetworkAnonymizationKey,
|
||||
"EnableDoubleKeyNetworkAnonymizationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kEnableCrossSiteFlagNetworkAnonymizationKey,
|
||||
"EnableCrossSiteFlagNetworkAnonymizationKey",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kTLS13KeyUpdate,
|
||||
"TLS13KeyUpdate",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPermuteTLSExtensions,
|
||||
"PermuteTLSExtensions",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPostQuantumKyber,
|
||||
"PostQuantumKyber",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPostQuantumCECPQ2,
|
||||
"PostQuantumCECPQ2",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
BASE_FEATURE(kPostQuantumCECPQ2SomeDomains,
|
||||
"PostQuantumCECPQ2SomeDomains",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
const base::FeatureParam<std::string>
|
||||
kPostQuantumCECPQ2Prefix(&kPostQuantumCECPQ2SomeDomains, "prefix", "a");
|
||||
|
||||
// This is feature-gated, but enabled, to act as a kill switch, in case there
|
||||
// are unforeseen consequences to fully removing TLS 1.0/1.1.
|
||||
//
|
||||
// TODO(https://crbug.com/1376584): Remove this feature and all TLS 1.0/1.1
|
||||
// support code.
|
||||
BASE_FEATURE(kSSLMinVersionAtLeastTLS12,
|
||||
"SSLMinVersionAtLeastTLS12",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kNetUnusedIdleSocketTimeout,
|
||||
"NetUnusedIdleSocketTimeout",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kShortLaxAllowUnsafeThreshold,
|
||||
"ShortLaxAllowUnsafeThreshold",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kSameSiteDefaultChecksMethodRigorously,
|
||||
"SameSiteDefaultChecksMethodRigorously",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
#if BUILDFLAG(TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED)
|
||||
// Enables the dual certificate verification trial feature.
|
||||
// https://crbug.com/649026
|
||||
BASE_FEATURE(kCertDualVerificationTrialFeature,
|
||||
"CertDualVerificationTrial",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
const base::FeatureParam<int> kCertDualVerificationTrialImpl{
|
||||
&kCertDualVerificationTrialFeature, "impl", 0};
|
||||
#endif /* BUILDFLAG(IS_MAC) */
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED)
|
||||
BASE_FEATURE(kChromeRootStoreUsed,
|
||||
"ChromeRootStoreUsed",
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
base::FEATURE_ENABLED_BY_DEFAULT
|
||||
#else
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#endif
|
||||
);
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
const base::FeatureParam<int> kChromeRootStoreSysImpl{&kChromeRootStoreUsed,
|
||||
"sysimpl", 0};
|
||||
#endif /* BUILDFLAG(IS_MAC) */
|
||||
#endif /* BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) */
|
||||
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(USE_NSS_CERTS) || BUILDFLAG(IS_WIN)
|
||||
BASE_FEATURE(kTrustStoreTrustedLeafSupport,
|
||||
"TrustStoreTrustedLeafSupport",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#endif
|
||||
|
||||
BASE_FEATURE(kTurnOffStreamingMediaCachingOnBattery,
|
||||
"TurnOffStreamingMediaCachingOnBattery",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kTurnOffStreamingMediaCachingAlways,
|
||||
"TurnOffStreamingMediaCachingAlways",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kSchemefulSameSite,
|
||||
"SchemefulSameSite",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kLimitOpenUDPSockets,
|
||||
"LimitOpenUDPSockets",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
extern const base::FeatureParam<int> kLimitOpenUDPSocketsMax(
|
||||
&kLimitOpenUDPSockets,
|
||||
"LimitOpenUDPSocketsMax",
|
||||
6000);
|
||||
|
||||
BASE_FEATURE(kTimeoutTcpConnectAttempt,
|
||||
"TimeoutTcpConnectAttempt",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
extern const base::FeatureParam<double> kTimeoutTcpConnectAttemptRTTMultiplier(
|
||||
&kTimeoutTcpConnectAttempt,
|
||||
"TimeoutTcpConnectAttemptRTTMultiplier",
|
||||
5.0);
|
||||
|
||||
extern const base::FeatureParam<base::TimeDelta> kTimeoutTcpConnectAttemptMin(
|
||||
&kTimeoutTcpConnectAttempt,
|
||||
"TimeoutTcpConnectAttemptMin",
|
||||
base::Seconds(8));
|
||||
|
||||
extern const base::FeatureParam<base::TimeDelta> kTimeoutTcpConnectAttemptMax(
|
||||
&kTimeoutTcpConnectAttempt,
|
||||
"TimeoutTcpConnectAttemptMax",
|
||||
base::Seconds(30));
|
||||
|
||||
#if BUILDFLAG(ENABLE_REPORTING)
|
||||
BASE_FEATURE(kDocumentReporting,
|
||||
"DocumentReporting",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#endif // BUILDFLAG(ENABLE_REPORTING)
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
|
||||
BASE_FEATURE(kUdpSocketPosixAlwaysUpdateBytesReceived,
|
||||
"UdpSocketPosixAlwaysUpdateBytesReceived",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
|
||||
|
||||
BASE_FEATURE(kCookieSameSiteConsidersRedirectChain,
|
||||
"CookieSameSiteConsidersRedirectChain",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kSamePartyAttributeEnabled,
|
||||
"SamePartyAttributeEnabled",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPartitionedCookies,
|
||||
"PartitionedCookies",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kNoncedPartitionedCookies,
|
||||
"NoncedPartitionedCookies",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kRecordRadioWakeupTrigger,
|
||||
"RecordRadioWakeupTrigger",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kClampCookieExpiryTo400Days,
|
||||
"ClampCookieExpiryTo400Days",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kStaticKeyPinningEnforcement,
|
||||
"StaticKeyPinningEnforcement",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kCookieDomainRejectNonASCII,
|
||||
"CookieDomainRejectNonASCII",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kBlockSetCookieHeader,
|
||||
"BlockSetCookieHeader",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// Run callbacks optimstically for write calls to the blockfile disk cache
|
||||
// implementation.
|
||||
BASE_FEATURE(kOptimisticBlockfileWrite,
|
||||
"OptimisticBlockfileWrite",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kStorageAccessAPI,
|
||||
"StorageAccessAPI",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
constexpr int kStorageAccessAPIDefaultImplicitGrantLimit = 5;
|
||||
const base::FeatureParam<int> kStorageAccessAPIImplicitGrantLimit{
|
||||
&kStorageAccessAPI, "storage-access-api-implicit-grant-limit",
|
||||
kStorageAccessAPIDefaultImplicitGrantLimit};
|
||||
const base::FeatureParam<bool> kStorageAccessAPIGrantsUnpartitionedStorage(
|
||||
&kStorageAccessAPI,
|
||||
"storage-access-api-grants-unpartitioned-storage",
|
||||
false);
|
||||
const base::FeatureParam<bool> kStorageAccessAPIAutoGrantInFPS{
|
||||
&kStorageAccessAPI, "storage_access_api_auto_grant_in_fps", true};
|
||||
const base::FeatureParam<bool> kStorageAccessAPIAutoDenyOutsideFPS{
|
||||
&kStorageAccessAPI, "storage_access_api_auto_deny_outside_fps", true};
|
||||
|
||||
// Enables partitioning of third party storage (IndexedDB, CacheStorage, etc.)
|
||||
// by the top level site to reduce fingerprinting.
|
||||
BASE_FEATURE(kThirdPartyStoragePartitioning,
|
||||
"ThirdPartyStoragePartitioning",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
// Whether to use the new code paths needed to support partitioning Blob URLs.
|
||||
// This exists as a kill-switch in case an issue is identified with the Blob
|
||||
// URL implementation that causes breakage.
|
||||
// TODO(https://crbug.com/1407944): Kill-switch activated - investigate cause of
|
||||
// increased renderer hangs.
|
||||
BASE_FEATURE(kSupportPartitionedBlobUrl,
|
||||
"SupportPartitionedBlobUrl",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kAlpsParsing, "AlpsParsing", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kAlpsClientHintParsing,
|
||||
"AlpsClientHintParsing",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kShouldKillSessionOnAcceptChMalformed,
|
||||
"ShouldKillSessionOnAcceptChMalformed",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kCaseInsensitiveCookiePrefix,
|
||||
"CaseInsensitiveCookiePrefix",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kEnableWebsocketsOverHttp3,
|
||||
"EnableWebsocketsOverHttp3",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kUseNAT64ForIPv4Literal,
|
||||
"UseNAT64ForIPv4Literal",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kBlockNewForbiddenHeaders,
|
||||
"BlockNewForbiddenHeaders",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
BASE_FEATURE(kPlatformKeyProbeSHA256,
|
||||
"PlatformKeyProbeSHA256",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#endif
|
||||
|
||||
// Enable support for HTTP extensible priorities (RFC 9218)
|
||||
BASE_FEATURE(kPriorityIncremental,
|
||||
"PriorityIncremental",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// Prefetch to follow normal semantics instead of 5-minute rule
|
||||
// https://crbug.com/1345207
|
||||
BASE_FEATURE(kPrefetchFollowsNormalCacheSemantics,
|
||||
"PrefetchFollowsNormalCacheSemantics",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
} // namespace net::features
|
5
src/third_party/blink/common/features.cc
vendored
5
src/third_party/blink/common/features.cc
vendored
|
@ -1775,6 +1775,11 @@ BASE_FEATURE(kQuoteEmptySecChUaStringHeadersConsistently,
|
|||
"QuoteEmptySecChUaStringHeadersConsistently",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kStorageAccessAPI,
|
||||
"StorageAccessAPI",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT
|
||||
);
|
||||
|
||||
const base::FeatureParam<int> kStorageAccessAPIImplicitGrantLimit{
|
||||
&kStorageAccessAPI, "storage-access-api-implicit-grant-limit", 5};
|
||||
const base::FeatureParam<bool> kStorageAccessAPIAutoGrantInFPS{
|
||||
|
|
|
@ -356,7 +356,8 @@ class OzonePlatformWayland : public OzonePlatform,
|
|||
(wl::get_version_of_object(
|
||||
connection_->zaura_shell()->wl_object()) >=
|
||||
ZAURA_SURFACE_SHOW_TOOLTIP_SINCE_VERSION) &&
|
||||
connection_->zaura_shell()->HasBugFix(1402158);
|
||||
connection_->zaura_shell()->HasBugFix(1402158) &&
|
||||
connection_->zaura_shell()->HasBugFix(1410676);
|
||||
}
|
||||
|
||||
if (surface_factory_) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023 The Chromium Authors and Alex313031. All rights reserved.
|
||||
# Copyright 2023 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
@ -17,6 +17,8 @@ component("views_examples_lib") {
|
|||
"animation_example.h",
|
||||
"ax_example.cc",
|
||||
"ax_example.h",
|
||||
"badge_example.cc",
|
||||
"badge_example.h",
|
||||
"box_layout_example.cc",
|
||||
"box_layout_example.h",
|
||||
"bubble_example.cc",
|
||||
|
|
Loading…
Reference in a new issue