diff --git a/build/cromite_patches/Add-a-proxy-configuration-page.patch b/build/cromite_patches/Add-a-proxy-configuration-page.patch index ee5e9648cdacc80e2e09b978a369db91bd5efa2c..5b42e599e23fb7ee7c3fe8bbfc5229cb162883de 100644 --- a/build/cromite_patches/Add-a-proxy-configuration-page.patch +++ b/build/cromite_patches/Add-a-proxy-configuration-page.patch @@ -206,7 +206,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/extensions/background_mode_manager.h" #endif -@@ -1685,6 +1687,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1692,6 +1694,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { component_updater::RegisterPrefs(registry); domain_reliability::RegisterPrefs(registry); embedder_support::OriginTrialPrefs::RegisterPrefs(registry); diff --git a/build/cromite_patches/Add-an-always-incognito-mode.patch b/build/cromite_patches/Add-an-always-incognito-mode.patch index ea86a9a7beeeada895a956d0d8fc18a464d5bf73..304b7523c90c11af05516a07bd23dd177e8e1766 100644 --- a/build/cromite_patches/Add-an-always-incognito-mode.patch +++ b/build/cromite_patches/Add-an-always-incognito-mode.patch @@ -1747,7 +1747,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #include "chrome/browser/android/ntp/recent_tabs_page_prefs.h" #include "chrome/browser/android/oom_intervention/oom_intervention_decider.h" #include "chrome/browser/android/preferences/browser_prefs_android.h" -@@ -2138,6 +2139,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2145,6 +2146,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry); variations::VariationsService::RegisterProfilePrefs(registry); webapps::InstallPromptPrefs::RegisterProfilePrefs(registry); diff --git a/build/cromite_patches/Add-cromite-flags-support.patch b/build/cromite_patches/Add-cromite-flags-support.patch index 78de0c5efe159f61b76d711474f1e931cc70552a..bc1b881a0950af25b147e0664644bf29340c8bd4 100644 --- a/build/cromite_patches/Add-cromite-flags-support.patch +++ b/build/cromite_patches/Add-cromite-flags-support.patch @@ -1009,7 +1009,7 @@ diff --git a/chrome/browser/unexpire_flags.cc b/chrome/browser/unexpire_flags.cc diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc -@@ -1612,5 +1612,5 @@ BASE_FEATURE(DisableShortcutsEnableDiy, base::FEATURE_ENABLED_BY_DEFAULT); +@@ -1623,5 +1623,5 @@ BASE_FEATURE(DisableShortcutsEnableDiy, base::FEATURE_ENABLED_BY_DEFAULT); // happen silently without prompting an updating dialog. BASE_FEATURE(SilentPolicyAndDefaultAppUpdating, base::FEATURE_DISABLED_BY_DEFAULT); @@ -2063,7 +2063,7 @@ diff --git a/services/network/public/cpp/features.h b/services/network/public/cp diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc -@@ -2566,4 +2566,5 @@ bool IsXrDevice() { +@@ -2569,4 +2569,5 @@ bool IsXrDevice() { // // DO NOT ADD NEW FEATURES HERE. @@ -2072,7 +2072,7 @@ diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/fea diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h -@@ -1903,6 +1903,7 @@ BLINK_COMMON_EXPORT bool IsXrDevice(); +@@ -1908,6 +1908,7 @@ BLINK_COMMON_EXPORT bool IsXrDevice(); // // DO NOT ADD NEW FEATURES HERE. diff --git a/build/cromite_patches/Content-settings-infrastructure.patch b/build/cromite_patches/Content-settings-infrastructure.patch index d03ccf8b53c4e787c2b6bea04c2c8cf6de749496..118842ed4a2781eeb406a162d8e84ecce09dd42a 100644 --- a/build/cromite_patches/Content-settings-infrastructure.patch +++ b/build/cromite_patches/Content-settings-infrastructure.patch @@ -1049,7 +1049,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c + permission_.setting = CONTENT_SETTING_ASK; + break; + case 4: -+ permission_.setting = CONTENT_SETTING_DEFAULT; ++ permission_.setting = std::nullopt; + break; + } + PermissionChanged(); diff --git a/build/cromite_patches/Disable-all-predictors-code.patch b/build/cromite_patches/Disable-all-predictors-code.patch index 0a2af2e326fbe00f25368508a18fe8ebbd73cd76..4849900dadbcbb290c010552244fe005ca61a427 100644 --- a/build/cromite_patches/Disable-all-predictors-code.patch +++ b/build/cromite_patches/Disable-all-predictors-code.patch @@ -376,7 +376,7 @@ diff --git a/chrome/browser/preloading/prefetch/search_prefetch/search_prefetch_ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -1197,7 +1197,6 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1201,7 +1201,6 @@ void ChromeBrowserMainExtraPartsProfiles:: base::FeatureList::IsEnabled( permissions::features::kPermissionOnDeviceGeolocationPredictions) || base::FeatureList::IsEnabled(permissions::features::kPermissionsAIv1)) { diff --git a/build/cromite_patches/Disable-privacy-sandbox.patch b/build/cromite_patches/Disable-privacy-sandbox.patch index f1783f3e0c27beafd8b708a2840ce1c4835f2963..dd45496b3a12774fb74ac3d4c334cb029f8bcafd 100644 --- a/build/cromite_patches/Disable-privacy-sandbox.patch +++ b/build/cromite_patches/Disable-privacy-sandbox.patch @@ -479,7 +479,7 @@ new file mode 100644 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc -@@ -2510,6 +2510,7 @@ BASE_FEATURE(XrDevice, base::FEATURE_DISABLED_BY_DEFAULT); +@@ -2513,6 +2513,7 @@ BASE_FEATURE(XrDevice, base::FEATURE_DISABLED_BY_DEFAULT); // constants for features in the section above. bool IsAllowURNsInIframeEnabled() { diff --git a/build/cromite_patches/Do-not-compile-QR-code-sharing.patch b/build/cromite_patches/Do-not-compile-QR-code-sharing.patch index 413a2e85385bd5eabc6beddce835040b78256d58..58282356291b2151e61c579a5a21f9b080c5eb76 100644 --- a/build/cromite_patches/Do-not-compile-QR-code-sharing.patch +++ b/build/cromite_patches/Do-not-compile-QR-code-sharing.patch @@ -52,7 +52,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -1945,7 +1945,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1952,7 +1952,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kUiAutomationProviderEnabled, false); #endif diff --git a/build/cromite_patches/Experimental-user-scripts-support.patch b/build/cromite_patches/Experimental-user-scripts-support.patch index 0ac16236d80149294589e52dbd2425f72fefccff..b61f415ae32ca62d8b66e9e8f4394b06746c7222 100644 --- a/build/cromite_patches/Experimental-user-scripts-support.patch +++ b/build/cromite_patches/Experimental-user-scripts-support.patch @@ -374,7 +374,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/contextual_cueing/contextual_cueing_prefs.h" #include "chrome/browser/gcm/gcm_product_util.h" -@@ -2084,6 +2085,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2091,6 +2092,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, registry); omnibox::RegisterProfilePrefs(registry); ZeroSuggestProvider::RegisterProfilePrefs(registry); @@ -400,7 +400,7 @@ diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -591,6 +591,11 @@ +@@ -592,6 +592,11 @@ #include "chrome/browser/net/nss_service_factory.h" #endif @@ -412,7 +412,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) { main_parts->AddParts(std::make_unique()); } -@@ -1428,6 +1433,10 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1432,6 +1437,10 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif WebDataServiceFactory::GetInstance(); webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance(); diff --git a/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch b/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch index 578391eef98fc75fbba16fda0a65c6552a9f1ef8..03a294bb9feae3c616e646af074691983053bf65 100644 --- a/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch +++ b/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch @@ -1202,7 +1202,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "components/adblock/content/browser/factories/content_security_policy_injector_factory.h" #include "components/adblock/content/browser/factories/element_hider_factory.h" #include "components/adblock/content/browser/factories/resource_classification_runner_factory.h" -@@ -945,7 +944,6 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -946,7 +945,6 @@ void ChromeBrowserMainExtraPartsProfiles:: // Makes manual testing possible. FakeSmartCardDeviceServiceFactory::GetInstance(); #endif diff --git a/build/cromite_patches/Move-navigation-bar-to-bottom.patch b/build/cromite_patches/Move-navigation-bar-to-bottom.patch index 4498eb90c9707c522359acf917ba2884030ec819..0d29acd5eaf71b252026c7ee7d7a3d78ef736969 100644 --- a/build/cromite_patches/Move-navigation-bar-to-bottom.patch +++ b/build/cromite_patches/Move-navigation-bar-to-bottom.patch @@ -2130,7 +2130,7 @@ diff --git a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.x diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -2395,7 +2395,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2402,7 +2402,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, #if BUILDFLAG(IS_ANDROID) registry->RegisterBooleanPref(prefs::kVirtualKeyboardResizesLayoutByDefault, diff --git a/build/cromite_patches/Remove-binary-blob-integrations.patch b/build/cromite_patches/Remove-binary-blob-integrations.patch index 645b3b68508341d986b78b0e78e3a5bc1eaec126..9d9a079fd633f1961af3ac132e0547e772e96f27 100644 --- a/build/cromite_patches/Remove-binary-blob-integrations.patch +++ b/build/cromite_patches/Remove-binary-blob-integrations.patch @@ -90,14 +90,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/omnibox/common/BUILD.gn | 1 - .../components/omnibox/OmniboxFeatures.java | 8 - components/signin/public/android/BUILD.gn | 3 - - components/webauthn/android/BUILD.gn | 18 +- - .../webauthn/AuthenticatorImpl.java | 97 +-- + components/webauthn/android/BUILD.gn | 12 +- .../webauthn/ConditionalUiState.java | 15 + + .../webauthn/Fido2CredentialRequest.java | 107 +-- .../webauthn/GmsCoreGetCredentialsHelper.java | 78 +- .../components/webauthn/GmsCoreUtils.java | 31 +- .../webauthn/IdentityCredentialsHelper.java | 78 +- .../webauthn/WebauthnModeProvider.java | 15 - - .../webauthn/cred_man/CredManHelper.java | 24 +- .../cred_man/CredManMetricsHelper.java | 17 +- .../push_messaging/push_messaging_manager.cc | 2 +- content/public/android/BUILD.gn | 4 - @@ -112,7 +111,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../gms/ChromiumPlayServicesAvailability.java | 10 +- third_party/androidx/customizations.gni | 14 +- third_party/cardboard/BUILD.gn | 4 - - 88 files changed, 137 insertions(+), 2618 deletions(-) + 87 files changed, 123 insertions(+), 2612 deletions(-) create mode 100644 components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected @@ -3254,27 +3253,16 @@ diff --git a/components/signin/public/android/BUILD.gn b/components/signin/publi diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/BUILD.gn --- a/components/webauthn/android/BUILD.gn +++ b/components/webauthn/android/BUILD.gn -@@ -7,8 +7,6 @@ import("//third_party/jni_zero/jni_zero.gni") - - generate_jni("jni_headers") { - sources = [ -- "java/src/org/chromium/components/webauthn/Fido2Api.java", -- "java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java", - "java/src/org/chromium/components/webauthn/InternalAuthenticator.java", - "java/src/org/chromium/components/webauthn/WebauthnBrowserBridge.java", - "java/src/org/chromium/components/webauthn/WebauthnFeatureMap.java", -@@ -40,10 +38,6 @@ android_library("java") { - "java/src/org/chromium/components/webauthn/AuthenticatorImpl.java", +@@ -41,8 +41,6 @@ android_library("java") { "java/src/org/chromium/components/webauthn/Barrier.java", "java/src/org/chromium/components/webauthn/CreateConfirmationUiDelegate.java", -- "java/src/org/chromium/components/webauthn/Fido2Api.java", + "java/src/org/chromium/components/webauthn/Fido2Api.java", - "java/src/org/chromium/components/webauthn/Fido2ApiCall.java", - "java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java", -- "java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java", + "java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java", "java/src/org/chromium/components/webauthn/FidoIntentSender.java", "java/src/org/chromium/components/webauthn/GetCredentialResponseCallback.java", - "java/src/org/chromium/components/webauthn/GetMatchingCredentialIdsResponseCallback.java", -@@ -73,11 +67,11 @@ android_library("java") { +@@ -73,11 +71,11 @@ android_library("java") { "java/src/org/chromium/components/webauthn/cred_man/GpmCredManRequestDecorator.java", ] @@ -3290,16 +3278,7 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "//base:base_java", "//base:service_loader_java", "//base/version_info/android:version_constants_java", -@@ -148,8 +142,6 @@ android_library("test_support_java") { - source_set("android") { - sources = [ - "cred_man_support.h", -- "fido2api_native_android.cc", -- "fido2credentialrequest_native_android.cc", - "internal_authenticator_android.cc", - "internal_authenticator_android.h", - "webauthn_browser_bridge.cc", -@@ -223,8 +215,6 @@ robolectric_library("junit") { +@@ -223,8 +221,6 @@ robolectric_library("junit") { deps = [ ":java", ":test_support_java", @@ -3308,213 +3287,192 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "//base:base_java", "//base:base_java_test_support", "//base:base_junit_test_support", -diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java ---- a/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java -+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java -@@ -76,19 +76,11 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - - private @Nullable MakeCredential_Response mMakeCredentialCallback; - private @Nullable GetCredential_Response mGetCredentialCallback; -- private @Nullable Fido2CredentialRequest mPendingFido2CredentialRequest; -- private final Set mUnclosedFido2CredentialRequests = new HashSet<>(); -- - // Information about the request cached here for metric reporting purposes. - private boolean mIsConditionalRequest; - private boolean mIsPaymentRequest; - private boolean mIsImmediateRequest; - -- // StaticFieldLeak complains that this is a memory leak because -- // `Fido2CredentialRequest` contains a `Context`. But this field is only -- // used in tests so a memory leak is irrelevent. -- @SuppressLint("StaticFieldLeak") -- private static @Nullable Fido2CredentialRequest sFido2CredentialRequestOverrideForTesting; - - /** - * Builds the Authenticator service implementation. -@@ -124,19 +116,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - mCreateConfirmationUiDelegate = createConfirmationUiDelegate; - } +diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java +new file mode 100644 +--- /dev/null ++++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java +@@ -0,0 +1,15 @@ ++// Copyright 2018 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++package org.chromium.components.webauthn; ++ ++public enum ConditionalUiState { ++ NONE, ++ WAITING_FOR_RP_ID_VALIDATION, ++ WAITING_FOR_CREDENTIAL_LIST, ++ WAITING_FOR_SELECTION, ++ REQUEST_SENT_TO_PLATFORM, ++ CANCEL_PENDING, ++ CANCEL_PENDING_RP_ID_VALIDATION_COMPLETE, ++} +diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java +--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java ++++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java +@@ -26,8 +26,6 @@ import android.util.Pair; + import androidx.annotation.RequiresApi; + import androidx.annotation.VisibleForTesting; -- public static void overrideFido2CredentialRequestForTesting(Fido2CredentialRequest request) { -- sFido2CredentialRequestOverrideForTesting = request; -- } -- -- private Fido2CredentialRequest getFido2CredentialRequest() { -- if (sFido2CredentialRequestOverrideForTesting != null) { -- return sFido2CredentialRequestOverrideForTesting; -- } -- Fido2CredentialRequest request = new Fido2CredentialRequest(this); -- mUnclosedFido2CredentialRequests.add(request); -- return request; -- } +-import com.google.android.gms.tasks.Task; - - /** - * Called by InternalAuthenticatorAndroid, which facilitates WebAuthn for processes that - * originate from the browser process. Since the request is from the browser process, the -@@ -196,16 +175,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - - private void continueMakeCredential(PublicKeyCredentialCreationOptions options) { - log(TAG, "continueMakeCredential"); -- mPendingFido2CredentialRequest = getFido2CredentialRequest(); -- mPendingFido2CredentialRequest.handleMakeCredentialRequest( -- options, -- maybeCreateBrowserOptions(), -- assertNonNull(mOrigin), -- mTopOrigin, -- mPayment, -- this::onRegisterResponse, -- this::onError, -- this::recordOutcomeEvent); - } + import org.jni_zero.JNINamespace; + import org.jni_zero.NativeMethods; - private @Nullable Bundle maybeCreateBrowserOptions() { -@@ -241,17 +210,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - onError(AuthenticatorStatus.NOT_IMPLEMENTED); +@@ -48,7 +46,6 @@ import org.chromium.blink.mojom.ResidentKeyRequirement; + import org.chromium.blink_public.common.BlinkFeatures; + import org.chromium.build.annotations.NullMarked; + import org.chromium.build.annotations.Nullable; +-import org.chromium.components.webauthn.Fido2ApiCall.Fido2ApiCallParams; + import org.chromium.components.webauthn.cred_man.CredManHelper; + import org.chromium.components.webauthn.cred_man.CredManSupportProvider; + import org.chromium.content_public.browser.ClientDataJson; +@@ -132,12 +129,7 @@ public class Fido2CredentialRequest + */ + public Fido2CredentialRequest(AuthenticationContextProvider authenticationContextProvider) { + mAuthenticationContextProvider = authenticationContextProvider; +- boolean playServicesAvailable; +- try { +- playServicesAvailable = Fido2ApiCallHelper.getInstance().arePlayServicesAvailable(); +- } catch (Exception e) { +- playServicesAvailable = false; +- } ++ boolean playServicesAvailable = false; + mPlayServicesAvailable = playServicesAvailable; + mCredManHelper = + new CredManHelper(mAuthenticationContextProvider, this, mPlayServicesAvailable); +@@ -334,22 +326,6 @@ public class Fido2CredentialRequest + returnErrorAndResetCallback(AuthenticatorStatus.UNKNOWN_ERROR); + return; + } +- try { +- Fido2ApiCallHelper.getInstance() +- .invokeFido2MakeCredential( +- mAuthenticationContextProvider, +- options, +- Uri.parse(convertOriginToString(origin)), +- clientDataHash, +- maybeBrowserOptions, +- getMaybeResultReceiver(), +- this::onGotPendingIntent, +- this::onBinderCallException); +- } catch (NoSuchAlgorithmException e) { +- mMakeCredentialErrorOutcome = MakeCredentialOutcome.ALGORITHM_NOT_SUPPORTED; +- returnErrorAndResetCallback(AuthenticatorStatus.ALGORITHM_UNSUPPORTED); +- return; +- } + return; + } + int result = +@@ -397,23 +373,6 @@ public class Fido2CredentialRequest + returnErrorAndResetCallback(AuthenticatorStatus.UNKNOWN_ERROR); return; } -- assumeNonNull(options.publicKey); - -- mPendingFido2CredentialRequest = getFido2CredentialRequest(); -- mPendingFido2CredentialRequest.handleGetCredentialRequest( -- options, -- assertNonNull(mOrigin), -- mTopOrigin, -- mPayment, -- this::onCredentialResponse, -- this::onError, -- this::recordOutcomeEvent); +- try { +- Fido2ApiCallHelper.getInstance() +- .invokeFido2MakeCredential( +- mAuthenticationContextProvider, +- options, +- Uri.parse(convertOriginToString(origin)), +- clientDataHash, +- maybeBrowserOptions, +- getMaybeResultReceiver(), +- this::onGotPendingIntent, +- this::onBinderCallException); +- } catch (NoSuchAlgorithmException e) { +- mMakeCredentialErrorOutcome = MakeCredentialOutcome.ALGORITHM_NOT_SUPPORTED; +- returnErrorAndResetCallback(AuthenticatorStatus.ALGORITHM_UNSUPPORTED); +- return; +- } } - @Override -@@ -283,10 +241,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - decoratedCallback.call(false); + /** +@@ -785,32 +744,6 @@ public class Fido2CredentialRequest + callback.onIsUserVerifyingPlatformAuthenticatorAvailableResponse(false); return; } - -- getFido2CredentialRequest() -- .handleIsUserVerifyingPlatformAuthenticatorAvailableRequest( -- isUvpaa -> decoratedCallback.call(isUvpaa)); - } - - @Override -@@ -323,34 +277,7 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - return; - } - -- getFido2CredentialRequest() -- .handleIsUserVerifyingPlatformAuthenticatorAvailableRequest( -- isUvpaa -> { -- capabilities.add( -- createWebAuthnClientCapability( -- AuthenticatorConstants.CAPABILITY_CONDITIONAL_GET, -- couldSupportConditionalMediation() && isUvpaa)); -- capabilities.add( -- createWebAuthnClientCapability( -- AuthenticatorConstants.CAPABILITY_UVPAA, -- couldSupportUvpaa() && isUvpaa)); -- boolean conditionalCreateEnabled = -- couldSupportConditionalMediation() -- && DeviceFeatureMap.isEnabled( -- DeviceFeatureList.WEBAUTHN_PASSKEY_UPGRADE); -- capabilities.add( -- createWebAuthnClientCapability( -- AuthenticatorConstants.CAPABILITY_CONDITIONAL_CREATE, -- isUvpaa && conditionalCreateEnabled)); -- capabilities.add( -- createWebAuthnClientCapability( -- AuthenticatorConstants.CAPABILITY_IMMEDIATE_GET, -- DeviceFeatureMap.isEnabled( -- DeviceFeatureList -- .WEBAUTHN_IMMEDIATE_GET) -- && isUvpaa)); -- callback.call(capabilities.toArray(new WebAuthnClientCapability[0])); -- }); -+ callback.call(capabilities.toArray(new WebAuthnClientCapability[0])); - } - - // Helper function to create WebAuthnClientCapability instances -@@ -381,14 +308,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - callback.onResponse(new ArrayList()); - return; - } +- Fido2ApiCallParams params = +- WebauthnModeProvider.getInstance() +- .getFido2ApiCallParams(mAuthenticationContextProvider.getWebContents()); +- assertNonNull(mAuthenticationContextProvider.getContext()); +- assertNonNull(params); +- Fido2ApiCall call = new Fido2ApiCall(mAuthenticationContextProvider.getContext(), params); +- Fido2ApiCall.BooleanResult result = new Fido2ApiCall.BooleanResult(); +- Parcel args = call.start(); +- args.writeStrongBinder(result); - -- getFido2CredentialRequest() -- .handleGetMatchingCredentialIdsRequest( -- relyingPartyId, -- credentialIds, -- requireThirdPartyPayment, -- callback, -- this::onError); +- Task task = +- call.run( +- params.mIsUserVerifyingPlatformAuthenticatorAvailableMethodId, +- Fido2ApiCall.TRANSACTION_ISUVPAA, +- args, +- result); +- task.addOnSuccessListener( +- (isUvpaa) -> { +- callback.onIsUserVerifyingPlatformAuthenticatorAvailableResponse(isUvpaa); +- }); +- task.addOnFailureListener( +- (e) -> { +- logError(TAG, "FIDO2 API call failed", e); +- callback.onIsUserVerifyingPlatformAuthenticatorAvailableResponse(false); +- }); } - @Override -@@ -399,13 +318,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - callback.call(false); - return; + public void handleGetMatchingCredentialIdsRequest( +@@ -1139,16 +1072,6 @@ public class Fido2CredentialRequest + if (options.mediation == Mediation.CONDITIONAL) { + mCancellableUiState = CancellableUiState.REQUEST_SENT_TO_PLATFORM; } - -- // If the gmscore and chromium versions are out of sync for some reason, this method will -- // return true but chrome will ignore conditional requests. Android surfaces only platform -- // credentials on conditional requests, use IsUVPAA as a proxy for availability. -- getFido2CredentialRequest() -- .handleIsUserVerifyingPlatformAuthenticatorAvailableRequest( -- isUvpaa -> callback.call(isUvpaa)); +- Fido2ApiCallHelper.getInstance() +- .invokeFido2GetAssertion( +- mAuthenticationContextProvider, +- publicKeyOptions, +- Uri.parse(callerOriginString), +- clientDataHash, +- getMaybeResultReceiver(), +- this::onGotPendingIntent, +- this::onBinderCallException); } - @Override -@@ -417,9 +329,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - if (!mIsOperationPending || mGetCredentialCallback == null) { + private void handleNonCredentialReturn(GetCredentialOptions options, Integer reason) { +@@ -1192,34 +1115,6 @@ public class Fido2CredentialRequest return; } -- -- assumeNonNull(mPendingFido2CredentialRequest); -- mPendingFido2CredentialRequest.cancelGetAssertion(); - } - - /** Callbacks for receiving responses from the internal handlers. */ -@@ -468,7 +377,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - } else if (mGetCredentialCallback != null) { - mGetCredentialCallback.call(getCredentialResponseForAssertion(status, null)); - } -- if (mPendingFido2CredentialRequest != null) mPendingFido2CredentialRequest.destroyBridge(); - cleanupRequest(); - } - -@@ -508,14 +416,11 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon - mIsOperationPending = false; - mMakeCredentialCallback = null; - mGetCredentialCallback = null; -- mPendingFido2CredentialRequest = null; - } - - @Override - public void close() { - log(TAG, "close"); -- mUnclosedFido2CredentialRequests.forEach(Fido2CredentialRequest::destroyBridge); -- mUnclosedFido2CredentialRequests.clear(); - cleanupRequest(); + mCancellableUiState = CancellableUiState.REQUEST_SENT_TO_PLATFORM; +- +- Fido2ApiCallParams params = +- WebauthnModeProvider.getInstance() +- .getFido2ApiCallParams(mAuthenticationContextProvider.getWebContents()); +- assertNonNull(mAuthenticationContextProvider.getContext()); +- assertNonNull(params); +- Fido2ApiCall call = new Fido2ApiCall(mAuthenticationContextProvider.getContext(), params); +- Parcel args = call.start(); +- String callbackDescriptor = params.mCallbackDescriptor; +- Fido2ApiCall.PendingIntentResult result = +- new Fido2ApiCall.PendingIntentResult(callbackDescriptor); +- args.writeStrongBinder(result); +- args.writeInt(1); // This indicates that the following options are present. +- Fido2Api.appendBrowserGetAssertionOptionsToParcel( +- options, +- Uri.parse(callerOriginString), +- clientDataHash, +- /* tunnelId= */ null, +- /* resultReceiver= */ null, +- args); +- Task task = +- call.run( +- Fido2ApiCall.METHOD_BROWSER_HYBRID_SIGN, +- Fido2ApiCall.TRANSACTION_HYBRID_SIGN, +- args, +- result); +- task.addOnSuccessListener(this::onGotPendingIntent); +- task.addOnFailureListener(this::onBinderCallException); } -diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java -new file mode 100644 ---- /dev/null -+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java -@@ -0,0 +1,15 @@ -+// Copyright 2018 The Chromium Authors -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+package org.chromium.components.webauthn; -+ -+public enum ConditionalUiState { -+ NONE, -+ WAITING_FOR_RP_ID_VALIDATION, -+ WAITING_FOR_CREDENTIAL_LIST, -+ WAITING_FOR_SELECTION, -+ REQUEST_SENT_TO_PLATFORM, -+ CANCEL_PENDING, -+ CANCEL_PENDING_RP_ID_VALIDATION_COMPLETE, -+} + // Handles a PendingIntent from the GMSCore FIDO library. diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/GmsCoreGetCredentialsHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/GmsCoreGetCredentialsHelper.java --- a/components/webauthn/android/java/src/org/chromium/components/webauthn/GmsCoreGetCredentialsHelper.java +++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/GmsCoreGetCredentialsHelper.java @@ -3813,75 +3771,6 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut public @WebauthnMode int getWebauthnMode(@Nullable WebContents webContents) { if (mGlobalMode != WebauthnMode.NONE) return mGlobalMode; return WebauthnModeProviderJni.get().getWebauthnModeForWebContents(webContents); -diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java ---- a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java -+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java -@@ -40,8 +40,6 @@ import org.chromium.build.annotations.NullMarked; - import org.chromium.build.annotations.Nullable; - import org.chromium.components.webauthn.AuthenticationContextProvider; - import org.chromium.components.webauthn.Barrier; --import org.chromium.components.webauthn.Fido2CredentialRequest.CancellableUiState; --import org.chromium.components.webauthn.Fido2CredentialRequestJni; - import org.chromium.components.webauthn.GetAssertionOutcome; - import org.chromium.components.webauthn.GetCredentialResponseCallback; - import org.chromium.components.webauthn.MakeCredentialOutcome; -@@ -83,6 +81,16 @@ public class CredManHelper { - private CredManMetricsHelper mMetricsHelper; - private @Nullable Runnable mNoCredentialsFallback; - -+ public enum CancellableUiState { -+ NONE, -+ WAITING_FOR_RP_ID_VALIDATION, -+ WAITING_FOR_CREDENTIAL_LIST, -+ WAITING_FOR_SELECTION, -+ REQUEST_SENT_TO_PLATFORM, -+ CANCEL_PENDING, -+ CANCEL_PENDING_RP_ID_VALIDATION_COMPLETE, -+ } -+ - // A callback that provides an AuthenticatorStatus error in the first argument, and optionally a - // metrics recording outcome in the second. - public interface ErrorCallback { -@@ -113,8 +121,7 @@ public class CredManHelper { - ErrorCallback errorCallback) { - log(TAG, "startMakeRequest"); - mClientDataJson = clientDataJson; -- final String requestAsJson = -- Fido2CredentialRequestJni.get().createOptionsToJson(options.serialize()); -+ final String requestAsJson = ""; - - OutcomeReceiver receiver = - new OutcomeReceiver<>() { -@@ -450,8 +457,7 @@ public class CredManHelper { - CRED_MAN_PREFIX - + "BUNDLE_KEY_AUTHENTICATION_RESPONSE_JSON"); - assertNonNull(json); -- byte[] responseSerialized = -- Fido2CredentialRequestJni.get().getCredentialResponseFromJson(json); -+ byte[] responseSerialized = null; - if (responseSerialized == null) { - logError( - TAG, -@@ -619,8 +625,7 @@ public class CredManHelper { - boolean requestPasswords, - boolean preferImmediatelyAvailable, - boolean ignoreGpm) { -- final String requestAsJson = -- Fido2CredentialRequestJni.get().getOptionsToJson(options.serialize()); -+ final String requestAsJson = ""; - - boolean hasAllowCredentials = - options.allowCredentials != null && options.allowCredentials.length != 0; -@@ -658,8 +663,7 @@ public class CredManHelper { - Bundle data) { - String json = data.getString(BUNDLE_KEY_REGISTRATION_RESPONSE_JSON); - assertNonNull(json); -- byte[] responseSerialized = -- Fido2CredentialRequestJni.get().makeCredentialResponseFromJson(json); -+ byte[] responseSerialized = null; - if (responseSerialized == null) { - logError(TAG, "Failed to convert response from CredMan to Mojo object: %s", json); - return null; diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java --- a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java +++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java diff --git a/build/cromite_patches/Restore-LastTabStandingTracker.patch b/build/cromite_patches/Restore-LastTabStandingTracker.patch index b5f45d7f84cfe6b0a0be8d8d9afaf24eab1c12d1..4537bdb7bf74e18af0cb75a9494da6acc52a2578 100644 --- a/build/cromite_patches/Restore-LastTabStandingTracker.patch +++ b/build/cromite_patches/Restore-LastTabStandingTracker.patch @@ -391,7 +391,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "chrome/browser/permissions/notifications_engagement_service_factory.h" #include "chrome/browser/permissions/one_time_permissions_tracker_factory.h" #include "chrome/browser/permissions/origin_keyed_permission_action_service_factory.h" -@@ -1105,6 +1106,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1109,6 +1110,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) OnDeviceTailModelServiceFactory::GetInstance(); #endif diff --git a/build/cromite_patches/eyeo-133.0.6943.49-chrome_integration.patch b/build/cromite_patches/eyeo-133.0.6943.49-chrome_integration.patch index a4c95ad9bfbf7c7193fcb1e07a01c65d141ee1f5..dc30ebe80b6f1ab6b39db762554bc7ae3c8535eb 100644 --- a/build/cromite_patches/eyeo-133.0.6943.49-chrome_integration.patch +++ b/build/cromite_patches/eyeo-133.0.6943.49-chrome_integration.patch @@ -3656,7 +3656,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "components/autofill/content/browser/autofill_log_router_factory.h" #include "components/breadcrumbs/core/breadcrumbs_status.h" #include "components/captive_portal/core/buildflags.h" -@@ -932,6 +945,15 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -933,6 +946,15 @@ void ChromeBrowserMainExtraPartsProfiles:: // Makes manual testing possible. FakeSmartCardDeviceServiceFactory::GetInstance(); #endif diff --git a/versions.txt b/versions.txt index d0324be45fc2ef139a05d61d848c8792714dfb95..de825cde1b56965d9abdecf74125ce78935d7608 100644 --- a/versions.txt +++ b/versions.txt @@ -1,3 +1,3 @@ chromium_version="141.0.7390.70" -cromite_branch="v141.0.7390.55-b2824377c30847f42e00c6ace66d91fa516b5f51" +cromite_branch="v141.0.7390.70-fb75694894a4d87f4651d41f25377be6db03ce12" ungoogled_chromium_branch="141.0.7390.65-1"