Status Update
Comments
pb...@google.com <pb...@google.com>
ap...@google.com <ap...@google.com> #2
Branch: main
commit 6dc78fbbbbadac9c2dc2065150a7af2422c6115c
Author: Rupert Ben Wiser <bewise@chromium.org>
Date: Thu Sep 12 16:16:14 2024
webview: Add support configuration for CHIPS
Adding a boundary interface to let Android developers configure
if partitioned cookies should be enabled or not.
go/chips-android-apis-webview
Bug: 364904765
Change-Id: I683ab5ec157a11aa081db5763380e692ab02c5e6
Reviewed-on:
Reviewed-by: Peter Pakkenberg <pbirk@chromium.org>
Auto-Submit: Rupert Wiser <bewise@chromium.org>
Commit-Queue: Peter Pakkenberg <pbirk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1354607}
M android_webview/expectations/system_webview_32_64_bundle.AndroidManifest.expected
M android_webview/expectations/system_webview_32_bundle.AndroidManifest.expected
M android_webview/expectations/system_webview_64_bundle.AndroidManifest.expected
M android_webview/expectations/system_webview_bundle.AndroidManifest.expected
M android_webview/expectations/trichrome_webview_32_64_bundle.AndroidManifest.expected
M android_webview/expectations/trichrome_webview_32_bundle.AndroidManifest.expected
M android_webview/expectations/trichrome_webview_64_32_bundle.AndroidManifest.expected
M android_webview/expectations/trichrome_webview_64_bundle.AndroidManifest.expected
M android_webview/expectations/trichrome_webview_bundle.AndroidManifest.expected
M android_webview/glue/java/src/com/android/webview/chromium/AndroidXProcessGlobalConfig.java
M android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
M android_webview/nonembedded/java/AndroidManifest.xml
M android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java
M chrome/android/expectations/monochrome_32_64_public_bundle__base.AndroidManifest.expected
M chrome/android/expectations/monochrome_32_public_bundle__base.AndroidManifest.expected
M chrome/android/expectations/monochrome_64_32_public_bundle__base.AndroidManifest.expected
M chrome/android/expectations/monochrome_64_public_bundle__base.AndroidManifest.expected
M chrome/android/expectations/monochrome_public_bundle__base.AndroidManifest.expected
ap...@google.com <ap...@google.com> #3
There is already test coverage of CHIPS behavior inside of Chromium in
Due to limitations of AndroidX test infra, manual test instructions are necessary to exercise the toggling of the enable partitioned cookies API. WebView toggles CHIPS behavior with the disable-partitioned-cookies
command line switch.
To demonstrate the API's correctness in toggling this, log statements were inspected when this flag was toggled during WebView startup.
See the diff below for details:
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
index 63c5f5a5b2795..ee589176bdab2 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
@@ -490,6 +490,9 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
if (!androidXConfig.getPartitionedCookiesEnabled()) {
cl.appendSwitch("disable-partitioned-cookies");
+ Log.e(TAG, "Partitioned cookies disabled");
+ } else {
+ Log.e(TAG, "Partitioned cookies enabled");
}
// Now safe to use WebView data directory.
ap...@google.com <ap...@google.com> #4
Note: Will add testing when more of the API has been implemented.
pr...@google.com <pr...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Adam Walls <
Link:
[WebView] Add API to configure CHIPS
Expand for full commit details
[WebView] Add API to configure CHIPS
This adds an API to allow Android developers to configure CHIPS globally. This is done with ProcessGlobalConfig. In order to prevent this from being published/used prior to Android B's release, RestrictTo annotation is used.
Design: go/chips-android-apis-webview
Test: Will add testing in a follow-up CL.
Bug: 364904765
Change-Id: If6d630562be7209eb2ab00da2dbad9398ba0553e
Files:
- M
webkit/webkit/src/main/java/androidx/webkit/ProcessGlobalConfig.java
- M
webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java
- M
webkit/webkit/src/main/java/androidx/webkit/internal/StartupFeatures.java
- M
webkit/webkit/src/main/java/androidx/webkit/internal/WebViewFeatureInternal.java
Hash: 4fe72afdcf64cad8b2399ca7a28d1aa57a05f976
Date: Thu Oct 24 17:35:26 2024
Description
AndroidX tracking bug forhttps://crbug.com/373558938
This API will allow app developers to delete all browsing data for a given WebView profile, or delete all data for a specific site