Files
cromite/build/patches/Restore-chrome-password-store.patch
T

162 lines
9.5 KiB
Diff

From: uazo <uazo@users.noreply.github.com>
Date: Wed, 30 Sep 2020 07:40:01 +0000
Subject: Restore chrome password store
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
chrome/android/java/AndroidManifest.xml | 5 ++---
.../autofill/AutofillClientProviderUtils.java | 1 +
.../AccessLossWarningMetricsRecorder.java | 1 +
.../login_db_deprecation_runner_factory.cc | 2 +-
.../android/strings/android_chrome_strings.grd | 2 +-
.../ui/autofill/autofill_client_provider.cc | 16 ----------------
.../autofill/core/common/autofill_features.cc | 1 +
.../password_manager/core/browser/buildflags.gni | 2 +-
.../features/password_manager_features_util.cc | 1 +
components/sync/service/sync_prefs.cc | 2 +-
.../Restore-chrome-password-store.inc | 1 +
11 files changed, 11 insertions(+), 23 deletions(-)
create mode 100644 cromite_flags/components/password_manager/core/browser/features/password_features_cc/Restore-chrome-password-store.inc
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -456,10 +456,9 @@ by a child template that "extends" this file.
</intent-filter>
</activity>
- <activity android:name="org.chromium.chrome.browser.AutofillOptionsLauncher"
+ <activity android:name="org.chromium.chrome.browser.AutofillOptionsLauncher" android:exported="false"
android:theme="@style/Theme.BrowserUI.NoDisplay"
- android:excludeFromRecents="true"
- android:exported="true">
+ android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
<category android:name="android.intent.category.DEFAULT" />
diff --git a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java
--- a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java
+++ b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java
@@ -135,6 +135,7 @@ public class AutofillClientProviderUtils {
@CalledByNative
public static void setAutofillOptionsDeepLinkPref(boolean featureOn) {
+ featureOn = false;
Editor editor =
ContextUtils.getApplicationContext()
.getSharedPreferences(
diff --git a/chrome/browser/password_manager/android/access_loss/java/src/org/chromium/chrome/browser/access_loss/AccessLossWarningMetricsRecorder.java b/chrome/browser/password_manager/android/access_loss/java/src/org/chromium/chrome/browser/access_loss/AccessLossWarningMetricsRecorder.java
--- a/chrome/browser/password_manager/android/access_loss/java/src/org/chromium/chrome/browser/access_loss/AccessLossWarningMetricsRecorder.java
+++ b/chrome/browser/password_manager/android/access_loss/java/src/org/chromium/chrome/browser/access_loss/AccessLossWarningMetricsRecorder.java
@@ -116,6 +116,7 @@ public class AccessLossWarningMetricsRecorder {
public static void logExportFlowLastStepMetric(
@PasswordAccessLossWarningType int warningType,
@PasswordAccessLossWarningExportStep int exportStep) {
+ if ((true)) return;
RecordHistogram.recordEnumeratedHistogram(
getExportFlowFinalStepHistogramName(warningType),
exportStep,
diff --git a/chrome/browser/password_manager/android/login_db_deprecation_runner_factory.cc b/chrome/browser/password_manager/android/login_db_deprecation_runner_factory.cc
--- a/chrome/browser/password_manager/android/login_db_deprecation_runner_factory.cc
+++ b/chrome/browser/password_manager/android/login_db_deprecation_runner_factory.cc
@@ -39,7 +39,7 @@ std::unique_ptr<KeyedService>
LoginDbDeprecationRunnerFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const {
#if BUILDFLAG(USE_LOGIN_DATABASE_AS_BACKEND)
- return nullptr;
+ if ((true)) return nullptr;
#else
Profile* profile = Profile::FromBrowserContext(context);
PrefService* prefs = profile->GetPrefs();
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -736,7 +736,7 @@ For more settings that use data to improve your Chrome experience, go to <ph nam
Passwords
</message>
<message name="IDS_PASSWORD_MANAGER_SETTINGS_TITLE" desc="Title for the settings menu item leading to the Password Manager UI surface. This allows users to e.g. manage their saved passwords, toggle saving and auto-sign-in on/off, etc. [CHAR_LIMIT=32]">
- Google Password Manager
+ Password Manager
</message>
<message name="IDS_PASSWORD_SAVING_ON_BY_ADMINISTRATOR" desc="Subtitle for the settings menu item leading to the Password Manager UI surface, shown when the device administrator set saving passwords to enabled.">
Password saving is turned on by your administrator
diff --git a/chrome/browser/ui/autofill/autofill_client_provider.cc b/chrome/browser/ui/autofill/autofill_client_provider.cc
--- a/chrome/browser/ui/autofill/autofill_client_provider.cc
+++ b/chrome/browser/ui/autofill/autofill_client_provider.cc
@@ -29,22 +29,6 @@ AutofillClientProvider::AutofillClientProvider(PrefService* prefs) {
DelayRegisteringFieldTrialForA11yDeprecation();
prefs->SetBoolean(prefs::kAutofillUsingVirtualViewStructure,
true);
- if (base::FeatureList::IsEnabled(
- autofill::features::kAutofillVirtualViewStructureAndroid) &&
- base::FeatureList::IsEnabled(
- autofill::features::kAutofillThirdPartyModeContentProvider)) {
- Java_AutofillClientProviderUtils_setThirdPartyModePref(
- base::android::AttachCurrentThread(), uses_platform_autofill_);
- } else {
- Java_AutofillClientProviderUtils_unsetThirdPartyModePref(
- base::android::AttachCurrentThread());
- }
- Java_AutofillClientProviderUtils_setAutofillOptionsDeepLinkPref(
- base::android::AttachCurrentThread(),
- base::FeatureList::IsEnabled(
- autofill::features::kAutofillVirtualViewStructureAndroid) &&
- base::FeatureList::IsEnabled(
- autofill::features::kAutofillDeepLinkAutofillOptions));
#endif // BUILDFLAG(IS_ANDROID)
}
diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc
--- a/components/autofill/core/common/autofill_features.cc
+++ b/components/autofill/core/common/autofill_features.cc
@@ -792,6 +792,7 @@ BASE_FEATURE(kUseSettingsAddressEditorInPaymentsRequest,
BASE_FEATURE(kAutofillDeepLinkAutofillOptions,
"AutofillDeepLinkAutofillOptions",
base::FEATURE_ENABLED_BY_DEFAULT);
+SET_CROMITE_FEATURE_DISABLED(kAutofillDeepLinkAutofillOptions);
// Controls if Chrome Autofill UI surfaces ignore touch events if something is
// fully or partially obscuring the Chrome window.
diff --git a/components/password_manager/core/browser/buildflags.gni b/components/password_manager/core/browser/buildflags.gni
--- a/components/password_manager/core/browser/buildflags.gni
+++ b/components/password_manager/core/browser/buildflags.gni
@@ -9,7 +9,7 @@ declare_args() {
# The legacy password store backend is supported on android but usually disabled
# in favor of a downstream implementation. Important: the support for this flag
# is planned to be removed in November 2024.
- use_login_database_as_backend = !is_android
+ use_login_database_as_backend = true
}
# Drawables from the downstream clank/ repository are
diff --git a/components/password_manager/core/browser/features/password_manager_features_util.cc b/components/password_manager/core/browser/features/password_manager_features_util.cc
--- a/components/password_manager/core/browser/features/password_manager_features_util.cc
+++ b/components/password_manager/core/browser/features/password_manager_features_util.cc
@@ -29,6 +29,7 @@ namespace {
bool IsUserEligibleForAccountStorage(const PrefService* pref_service,
const syncer::SyncService* sync_service) {
+ if ((true)) return false;
if (!sync_service) {
return false;
}
diff --git a/components/sync/service/sync_prefs.cc b/components/sync/service/sync_prefs.cc
--- a/components/sync/service/sync_prefs.cc
+++ b/components/sync/service/sync_prefs.cc
@@ -768,7 +768,7 @@ bool SyncPrefs::IsTypeSupportedInTransportMode(UserSelectableType type) {
kSeparateLocalAndAccountSearchEngines);
#endif
case UserSelectableType::kPasswords:
- return true;
+ return false;
case UserSelectableType::kAutofill:
return true;
case UserSelectableType::kPayments:
diff --git a/cromite_flags/components/password_manager/core/browser/features/password_features_cc/Restore-chrome-password-store.inc b/cromite_flags/components/password_manager/core/browser/features/password_features_cc/Restore-chrome-password-store.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/components/password_manager/core/browser/features/password_features_cc/Restore-chrome-password-store.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_ENABLED(kSkipUndecryptablePasswords);
--