From e75d1240fcc70ede7da228eee11d78ecb7e2c496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Godlewski?= Date: Wed, 25 Oct 2023 15:31:53 +0000 Subject: [PATCH] [iOS] Add chrome://flags entry to enable password sharing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 1298608 Change-Id: Ice1d0f2adcc1eaab0755f56ffeba520f6eaec2fe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4974610 Commit-Queue: RafaƂ Godlewski Reviewed-by: Mohamed Amir Yosef Cr-Commit-Position: refs/heads/main@{#1214871} --- chrome/browser/flag-metadata.json | 2 +- ios/chrome/browser/flags/about_flags.mm | 13 +++++++++++++ .../browser/flags/ios_chrome_flag_descriptions.cc | 4 ++++ .../browser/flags/ios_chrome_flag_descriptions.h | 5 +++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index c7e6d184325a7..dbf20249d7b78 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json @@ -6193,7 +6193,7 @@ }, { "name": "password-sharing", - "owners": ["mamir@chromium.org", "chrome-password-manager-team@google.com"], + "owners": ["mamir@chromium.org", "rgod@google.com", "chrome-password-manager-team@google.com"], "expiry_milestone": 125 }, { diff --git a/ios/chrome/browser/flags/about_flags.mm b/ios/chrome/browser/flags/about_flags.mm index 85dc47363a77b..39b4b6b15a9f1 100644 --- a/ios/chrome/browser/flags/about_flags.mm +++ b/ios/chrome/browser/flags/about_flags.mm @@ -679,6 +679,16 @@ std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"}, }; +const FeatureEntry::Choice kEnablePasswordSharingChoices[] = { + {"Default", "", ""}, + {"Bootstraping Only", switches::kEnableFeatures, + "SharingOfferKeyPairBootstrap"}, + {"Enabled", switches::kEnableFeatures, + "SharingOfferKeyPairBootstrap,SendPasswords," + "PasswordManagerEnableSenderService," + "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"}, +}; + // To add a new entry, add to the end of kFeatureEntries. There are four // distinct types of entries: // . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the @@ -1587,6 +1597,9 @@ {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName, flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSSaveToDrive)}, + {"password-sharing", flag_descriptions::kPasswordSharingName, + flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos, + MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)}, }; bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) { diff --git a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc index 2c2122b70ae36..c035439fee0aa 100644 --- a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc +++ b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc @@ -854,6 +854,10 @@ const char kPasswordReuseDetectionDescription[] = "Displays warning when user types or pastes a saved password into a " "phishing website."; +const char kPasswordSharingName[] = "Enables password sharing"; +const char kPasswordSharingDescription[] = + "Enables password sharing between members of the same family."; + const char kPostRestoreDefaultBrowserPromoName[] = "Post Restore Default Browser Promo"; const char kPostRestoreDefaultBrowserPromoDescription[] = diff --git a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h index 9a19bd595cd65..716479c1a54e5 100644 --- a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h +++ b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h @@ -750,6 +750,11 @@ extern const char kUseAnnotationsForLanguageDetectionDescription[]; extern const char kPasswordReuseDetectionName[]; extern const char kPasswordReuseDetectionDescription[]; +// Title and description for the flag to enable password sharing between the +// members of the same family. +extern const char kPasswordSharingName[]; +extern const char kPasswordSharingDescription[]; + // Title and description for the flag to enable the post restore default browser // promo. extern const char kPostRestoreDefaultBrowserPromoName[];