Skip to content

Commit

Permalink
[AUTO][FILECONTROL] - version 132.0.6834.83 (#1720)
Browse files Browse the repository at this point in the history
[AUTO][FILECONTROL] - version 132.0.6834.83
  • Loading branch information
uazo authored Jan 9, 2025
2 parents 0a4efd1 + adcbd3d commit 72c7b0c
Show file tree
Hide file tree
Showing 183 changed files with 4,870 additions and 4,484 deletions.
2 changes: 1 addition & 1 deletion tools/under-control/src/RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
131.0.6778.205
132.0.6834.83
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.h"
#include "android_webview/browser/network_service/aw_proxying_url_loader_factory.h"
#include "android_webview/browser/network_service/aw_url_loader_throttle.h"
#include "android_webview/browser/prefetch/aw_prefetch_service_delegate.h"
#include "android_webview/browser/safe_browsing/aw_safe_browsing_navigation_throttle.h"
#include "android_webview/browser/safe_browsing/aw_url_checker_delegate_impl.h"
#include "android_webview/browser/supervised_user/aw_supervised_user_throttle.h"
Expand Down Expand Up @@ -94,6 +95,7 @@
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/network_service_instance.h"
#include "content/public/browser/prefetch_service_delegate.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
Expand Down Expand Up @@ -587,21 +589,15 @@ void AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
content::PosixFileDescriptorInfo* mappings) {
base::MemoryMappedFile::Region region;
int fd = ui::GetMainAndroidPackFd(&region);
if (base::FeatureList::IsEnabled(features::kWebViewCheckPakFileDescriptors)) {
CHECK_GE(fd, 0);
}
CHECK_GE(fd, 0);
mappings->ShareWithRegion(kAndroidWebViewMainPakDescriptor, fd, region);

fd = ui::GetCommonResourcesPackFd(&region);
if (base::FeatureList::IsEnabled(features::kWebViewCheckPakFileDescriptors)) {
CHECK_GE(fd, 0);
}
CHECK_GE(fd, 0);
mappings->ShareWithRegion(kAndroidWebView100PercentPakDescriptor, fd, region);

fd = ui::GetLocalePackFd(&region);
if (base::FeatureList::IsEnabled(features::kWebViewCheckPakFileDescriptors)) {
CHECK_GE(fd, 0);
}
CHECK_GE(fd, 0);
mappings->ShareWithRegion(kAndroidWebViewLocalePakDescriptor, fd, region);

int crash_signal_fd =
Expand All @@ -618,8 +614,7 @@ void AwContentBrowserClient::OverrideWebkitPrefs(
if (aw_settings) {
aw_settings->PopulateWebPreferences(web_prefs);
}
web_prefs->modal_context_menu =
!base::FeatureList::IsEnabled(features::kWebViewImageDrag);
web_prefs->modal_context_menu = false;
}

std::vector<std::unique_ptr<content::NavigationThrottle>>
Expand Down Expand Up @@ -680,6 +675,14 @@ AwContentBrowserClient::CreateThrottlesForNavigation(
return throttles;
}

std::unique_ptr<content::PrefetchServiceDelegate>
AwContentBrowserClient::CreatePrefetchServiceDelegate(
content::BrowserContext* browser_context) {
AwBrowserContext* aw_browser_context =
static_cast<AwBrowserContext*>(browser_context);
return std::make_unique<AwPrefetchServiceDelegate>(aw_browser_context);
}

std::unique_ptr<content::DevToolsManagerDelegate>
AwContentBrowserClient::CreateDevToolsManagerDelegate() {
return std::make_unique<AwDevToolsManagerDelegate>();
Expand Down Expand Up @@ -913,6 +916,8 @@ bool AwContentBrowserClient::HandleExternalProtocol(
content::RenderFrameHost* initiator_document,
const net::IsolationInfo& isolation_info,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);

// Sandbox flags
// =============
//
Expand Down Expand Up @@ -947,39 +952,28 @@ bool AwContentBrowserClient::HandleExternalProtocol(
// be schemes unrelated to the regular network stack so it doesn't make sense
// to look for cookies. Providing a nullopt for the cookie manager lets
// the AwProxyingURLLoaderFactory know to skip that work.
if (content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) {
// Manages its own lifetime.
new android_webview::AwProxyingURLLoaderFactory(
std::nullopt /* cookie_manager */, nullptr /* cookie_access_policy */,
isolation_info, web_contents_key, frame_tree_node_id,
std::move(receiver), mojo::NullRemote(), true /* intercept_only */,
std::nullopt /* security_options */,
nullptr /* xrw_allowlist_matcher */, std::move(browser_context_handle),
std::nullopt /* navigation_id */);
} else {
content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE,
base::BindOnce(
[](mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
std::optional<WebContentsKey> web_contents_key,
content::FrameTreeNodeId frame_tree_node_id,
scoped_refptr<AwBrowserContextIoThreadHandle>
browser_context_handle,
const net::IsolationInfo& isolation_info) {
// Manages its own lifetime.
new android_webview::AwProxyingURLLoaderFactory(
std::nullopt /* cookie_manager */,
nullptr /* cookie_access_policy */, isolation_info,
web_contents_key, frame_tree_node_id, std::move(receiver),
mojo::NullRemote(), true /* intercept_only */,
std::nullopt /* security_options */,
nullptr /* xrw_allowlist_matcher */,
std::move(browser_context_handle),
std::nullopt /* navigation_id */);
},
std::move(receiver), web_contents_key, frame_tree_node_id,
std::move(browser_context_handle), isolation_info));
}
content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE,
base::BindOnce(
[](mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
std::optional<WebContentsKey> web_contents_key,
content::FrameTreeNodeId frame_tree_node_id,
scoped_refptr<AwBrowserContextIoThreadHandle>
browser_context_handle,
const net::IsolationInfo& isolation_info) {
// Manages its own lifetime.
new android_webview::AwProxyingURLLoaderFactory(
std::nullopt /* cookie_manager */,
nullptr /* cookie_access_policy */, isolation_info,
web_contents_key, frame_tree_node_id, std::move(receiver),
mojo::NullRemote(), true /* intercept_only */,
std::nullopt /* security_options */,
nullptr /* xrw_allowlist_matcher */,
std::move(browser_context_handle),
std::nullopt /* navigation_id */);
},
std::move(receiver), web_contents_key, frame_tree_node_id,
std::move(browser_context_handle), isolation_info));
return false;
}

Expand Down Expand Up @@ -1253,17 +1247,7 @@ blink::UserAgentMetadata AwContentBrowserClient::GetUserAgentMetadata() {

content::ContentBrowserClient::WideColorGamutHeuristic
AwContentBrowserClient::GetWideColorGamutHeuristic() {
if (base::FeatureList::IsEnabled(features::kWebViewWideColorGamutSupport)) {
return WideColorGamutHeuristic::kUseWindow;
}

if (display::HasForceDisplayColorProfile() &&
display::GetForcedDisplayColorProfile() ==
gfx::ColorSpace::CreateDisplayP3D65()) {
return WideColorGamutHeuristic::kUseWindow;
}

return WideColorGamutHeuristic::kNone;
return WideColorGamutHeuristic::kUseWindow;
}

void AwContentBrowserClient::LogWebFeatureForCurrentPage(
Expand Down
38 changes: 27 additions & 11 deletions tools/under-control/src/android_webview/browser/aw_field_trials.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

#include "android_webview/browser/aw_field_trials.h"

#include "android_webview/common/aw_features.h"
#include "android_webview/common/aw_switches.h"
#include "base/allocator/partition_alloc_features.h"
#include "base/base_paths_android.h"
#include "base/check.h"
#include "base/feature_list.h"
Expand Down Expand Up @@ -263,21 +265,30 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
aw_feature_overrides.EnableFeature(network::features::kMaskedDomainList);
}

// Feature parameters can only be set via a field trial.
// Note: Performing a field trial here means we cannot include
// |kDIPSTtl| in the testing config json.
{
const char kDipsWebViewExperiment[] = "DipsWebViewExperiment";
const char kDipsWebViewGroup[] = "DipsWebViewGroup";
base::FieldTrial* dips_field_trial = base::FieldTrialList::CreateFieldTrial(
kDipsWebViewExperiment, kDipsWebViewGroup);
CHECK(dips_field_trial) << "Unexpected name conflict.";
base::FieldTrialParams params;
const std::string ttl_time_delta_30_days = "30d";
params.emplace(features::kDIPSInteractionTtl.name, ttl_time_delta_30_days);
base::AssociateFieldTrialParams(kDipsWebViewExperiment, kDipsWebViewGroup,
params);
aw_feature_overrides.OverrideFeatureWithFieldTrial(
features::kDIPSTtl,
base::FeatureList::OverrideState::OVERRIDE_ENABLE_FEATURE,
dips_field_trial);
}

// Delete Incidental Party State (DIPS) feature is not yet supported on
// WebView.
// TODO(b/344852824): Enable the feature for WebView
aw_feature_overrides.DisableFeature(::features::kDIPS);

// Async Safe Browsing check will be rolled out together with
// kHashPrefixRealTimeLookups on WebView.
aw_feature_overrides.DisableFeature(
safe_browsing::kSafeBrowsingAsyncRealTimeCheck);
aw_feature_overrides.DisableFeature(
safe_browsing::kHashPrefixRealTimeLookups);

// WebView does not currently support the Permissions API (crbug.com/490120)
aw_feature_overrides.DisableFeature(::features::kWebPermissionsApi);

// TODO(crbug.com/41492947): See crrev.com/c/5744034 for details, but I was
// unable to add this feature to fieldtrial_testing_config and pass all tests.
aw_feature_overrides.EnableFeature(blink::features::kElementGetInnerHTML);
Expand All @@ -293,4 +304,9 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
// TODO(crbug.com/336852432): Enable this feature for WebView.
aw_feature_overrides.DisableFeature(
blink::features::kNavigationPredictorNewViewportFeatures);

// This feature is global for the process and thus should not be enabled by
// WebView.
aw_feature_overrides.DisableFeature(
base::features::kPartitionAllocMemoryTagging);
}
24 changes: 8 additions & 16 deletions tools/under-control/src/chrome/android/java/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -850,21 +850,6 @@ by a child template that "extends" this file.
</intent-filter>
</activity>

<!-- configChanges is set here to prevent the destruction of the
activity after configuration changes. Since the bulk of this
activity's logic is in a feature module, restoring the activity
via a Bundle doesn't work. -->
<activity
android:name="org.chromium.chrome.browser.webauth.authenticator.CableAuthenticatorActivity"
android:configChanges="density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:theme="@style/Theme.Chromium.Activity.Fullscreen"
android:label="@string/cablev2_activity_title"
android:permission="com.google.android.gms.auth.cryptauth.permission.CABLEV2_SERVER_LINK"
android:exported="true"
android:excludeFromRecents="true"
android:launchMode="singleTop">
</activity>

<receiver
android:name="org.chromium.chrome.browser.browserservices.ui.trustedwebactivity.DisclosureAcceptanceBroadcastReceiver"
android:exported="false" />
Expand Down Expand Up @@ -1101,6 +1086,13 @@ by a child template that "extends" this file.
android:documentLaunchMode="always"
android:noHistory="true"/>

<!-- Activities for task manager. -->
<activity
android:name="org.chromium.chrome.browser.task_manager.TaskManagerActivity"
android:exported="false"
android:theme="@style/Theme.Chromium.Activity">
</activity>

<receiver android:name="org.chromium.chrome.browser.notifications.scheduler.DisplayAgent$Receiver"
android:exported="false"/>

Expand Down Expand Up @@ -1183,7 +1175,7 @@ by a child template that "extends" this file.
android:screenOrientation="landscape"
android:label="WebXR"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
tools:ignore="NonResizeableActivity">
tools:ignore="NonResizeableActivity,DiscouragedApi">
<property android:name="android.window.PROPERTY_ACTIVITY_STARTS_IN_IMMERSIVE_XR"
android:value="true" />
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/crash_upload_list/crash_upload_list.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
#include "chrome/browser/dips/chrome_dips_delegate.h"
#include "chrome/browser/dips/dips_service_impl.h"
#include "chrome/browser/dips/dips_utils.h"
#include "chrome/browser/domain_reliability/service_factory.h"
Expand Down Expand Up @@ -113,6 +114,7 @@
#include "components/history/core/common/pref_names.h"
#include "components/keyed_service/core/service_access_type.h"
#include "components/language/core/browser/url_language_histogram.h"
#include "components/lens/lens_features.h"
#include "components/media_device_salt/media_device_salt_service.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/pnacl_host.h"
Expand Down Expand Up @@ -150,6 +152,7 @@
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/browsing_data_filter_builder.h"
#include "content/public/browser/dips_delegate.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/origin_trials_controller_delegate.h"
#include "content/public/browser/prefetch_service_delegate.h"
Expand Down Expand Up @@ -186,7 +189,7 @@

#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/user_annotations/user_annotations_service_factory.h"
#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
#include "chrome/browser/user_education/browser_user_education_storage_service.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_provider.h"
Expand Down Expand Up @@ -278,7 +281,8 @@ ChromeBrowsingDataRemoverDelegate::ChromeBrowsingDataRemoverDelegate(
webapp_registry_(std::make_unique<WebappRegistry>())
#endif
,
credential_store_(MakeCredentialStore()) {
credential_store_(MakeCredentialStore()),
dips_delegate_(ChromeDipsDelegate::Create()) {
domain_reliability_clearer_ = base::BindRepeating(
[](BrowserContext* browser_context,
content::BrowsingDataFilterBuilder* filter_builder,
Expand Down Expand Up @@ -542,6 +546,17 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
if (optimization_guide_keyed_service)
optimization_guide_keyed_service->ClearData();

#if !BUILDFLAG(IS_ANDROID)
// Remove localStorage data from Lens Overlay UI whenever any history is
// deleted.
if (lens::features::IsLensOverlayTranslateLanguagesFetchEnabled()) {
profile_->GetDefaultStoragePartition()->ClearDataForOrigin(
content::StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE,
/*quota_storage_remove_mask=*/0,
GURL(chrome::kChromeUILensOverlayUntrustedURL), base::DoNothing());
}
#endif

content::PrefetchServiceDelegate::ClearData(profile_);

#if BUILDFLAG(IS_ANDROID)
Expand Down Expand Up @@ -611,7 +626,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
// Clear any stored User Education session data. Note that we can't clear a
// specific date range, as this is used for longitudinal metrics reporting,
// so selectively deleting entries would make the telemetry invalid.
BrowserFeaturePromoStorageService::ClearUsageHistory(profile_);
BrowserUserEducationStorageService::ClearUsageHistory(profile_);
#endif

// Cleared for DATA_TYPE_HISTORY, DATA_TYPE_COOKIES and DATA_TYPE_PASSWORDS.
Expand Down Expand Up @@ -896,9 +911,14 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
DIPSEventRemovalType dips_mask = DIPSEventRemovalType::kNone;
if ((remove_mask & content::BrowsingDataRemover::DATA_TYPE_COOKIES) &&
!filter_builder->PartitionedCookiesOnly()) {
dips_mask |= DIPSEventRemovalType::kStorage;
// If there's no delegate, delete everything whenever the user is deleting
// cookies.
dips_mask |= dips_delegate_ ? DIPSEventRemovalType::kStorage
: DIPSEventRemovalType::kAll;
}
if (remove_mask & constants::DATA_TYPE_HISTORY) {
// If there's a delegate, ask it whether to delete DIPS history.
if (dips_delegate_ &&
dips_delegate_->ShouldDeleteInteractionRecords(remove_mask)) {
dips_mask |= DIPSEventRemovalType::kHistory;
}

Expand Down
Loading

0 comments on commit 72c7b0c

Please sign in to comment.