Componentise/upstream some password manager resources
This CL changes the following (downstream part is CL 326497013):
(1)
It moves IDS_IOS_PASSWORD_MANAGER_SAVE_PASSWORD_PROMPT to //ios string
resources, and splits its Smart Lock branded version in a separate resource.
Furthermore, it stops using IDS_PRODUCT_NAME and instead creates separate
copies with Google Chrome / Chromium hard-coded instead.
(2)
It moves IDR_IOS_INFOBAR_SAVE_PASSWORD to the //ios image resources (adding
the _IOS in the name in the process). This resources has been defined
specially for iOS all the time.
(3)
It moves IDS_PASSWORD_MANAGER_SMART_LOCK to the component strings, because it
is used across all platforms.
BUG=514241
Review URL: https://codereview.chromium.org/1532893002
Cr-Commit-Position: refs/heads/master@{#365902}
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 9672553..f100103 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6061,9 +6061,6 @@
<message name="IDS_UPDATE_PASSWORD" desc="The title of the save password bubble when a password can be updated.">
Do you want <ph name="PASSWORD_MANAGER_BRAND">$1<ex>Google Chrome</ex></ph> to update your password for this site?
</message>
- <message name="IDS_PASSWORD_MANAGER_SMART_LOCK" desc="The brand name of the password manager for the title of the save password bubble when a user is signed in.">
- Google Smart Lock
- </message>
<message name="IDS_PASSWORD_MANAGER_SMART_LOCK_FOR_PASSWORDS" desc="The more descriptive brand name of the password manager when the user is signed in. Used in various UI elements, can be in link format.">
Google Smart Lock for Passwords
</message>
diff --git a/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc
index 144943de..0b0660c5 100644
--- a/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc
@@ -7,6 +7,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/grit/generated_resources.h"
+#include "grit/components_strings.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/range/range.h"
diff --git a/components/password_manager_strings.grdp b/components/password_manager_strings.grdp
index 5291c67..341c919b 100644
--- a/components/password_manager_strings.grdp
+++ b/components/password_manager_strings.grdp
@@ -4,5 +4,8 @@
<message name="IDS_PASSWORD_MANAGER_EMPTY_LOGIN" desc="A placeholder for the 'Manage Passwords' bubble's empty username label">
(No username)
</message>
+ <message name="IDS_PASSWORD_MANAGER_SMART_LOCK" desc="The brand name of the password manager for the title of the save password bubble when a user is signed in.">
+ Google Smart Lock
+ </message>
</grit-part>
diff --git a/ios/chrome/app/strings/ios_chromium_strings.grd b/ios/chrome/app/strings/ios_chromium_strings.grd
index 3a507f7..c330157e 100644
--- a/ios/chrome/app/strings/ios_chromium_strings.grd
+++ b/ios/chrome/app/strings/ios_chromium_strings.grd
@@ -148,6 +148,9 @@
<message name="IDS_IOS_LOCATION_AUTHORIZATION_ALERT" desc="Specifies the reason for sending the user's location to Google [Length: unlimited] [iOS only].">
Get a better Google experience in Chromium based on your location.
</message>
+ <message name="IDS_IOS_PASSWORD_MANAGER_SAVE_PASSWORD_PROMPT" desc="Info bar message to save a password. [Length: 60em]">
+ Do you want Chromium to save your password for this site?
+ </message>
</messages>
</release>
</grit>
diff --git a/ios/chrome/app/strings/ios_google_chrome_strings.grd b/ios/chrome/app/strings/ios_google_chrome_strings.grd
index 8552aac..756a6445 100644
--- a/ios/chrome/app/strings/ios_google_chrome_strings.grd
+++ b/ios/chrome/app/strings/ios_google_chrome_strings.grd
@@ -148,6 +148,9 @@
<message name="IDS_IOS_LOCATION_AUTHORIZATION_ALERT" desc="Specifies the reason for sending the user's location to Google [Length: unlimited] [iOS only].">
Get a better Google experience in Chrome based on your location.
</message>
+ <message name="IDS_IOS_PASSWORD_MANAGER_SAVE_PASSWORD_PROMPT" desc="Info bar message to save a password. [Length: 60em]">
+ Do you want Google Chrome to save your password for this site?
+ </message>
</messages>
</release>
</grit>
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd
index 7d76e91..0d1c6404 100644
--- a/ios/chrome/app/strings/ios_strings.grd
+++ b/ios/chrome/app/strings/ios_strings.grd
@@ -195,15 +195,16 @@
</message>
<!-- Password Manager -->
- <message name="IDS_IOS_PASSWORD_MANAGER_SAVE_PASSWORD_PROMPT" desc="Info bar message to save a password. [Length: 60em]">
- Do you want <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> to save your password for this site?
- </message>
<message name="IDS_IOS_PASSWORD_MANAGER_SAVE_BUTTON" desc="Save button text for password manager [Length: 10em]">
Save
</message>
<message name="IDS_IOS_PASSWORD_MANAGER_BLACKLIST_BUTTON" desc="Button text for the 'Save Password' infobar's 'Never remember for this site' option [Length: 10em]">
Never
</message>
+ <message name="IDS_IOS_PASSWORD_MANAGER_SAVE_PASSWORD_PROMPT_SMART_LOCK_BRANDING" desc="Info bar message to save a password, referring to the Google Smart Lock
+brand. [Length: 70em]">
+ Do you want Google Smart Lock to save your password for this site?
+ </message>
<!-- Password Generation -->
<message name="IDS_IOS_GENERATED_PASSWORD_ACCEPT" desc="The text of the button that accepts the generated password. [Length: 20em] [iOS only]">
diff --git a/ios/chrome/app/theme/default_100_percent/infobar_save_password.png b/ios/chrome/app/theme/default_100_percent/infobar_save_password.png
new file mode 100644
index 0000000..b27576f
--- /dev/null
+++ b/ios/chrome/app/theme/default_100_percent/infobar_save_password.png
Binary files differ
diff --git a/ios/chrome/app/theme/default_200_percent/infobar_save_password.png b/ios/chrome/app/theme/default_200_percent/infobar_save_password.png
new file mode 100644
index 0000000..99809f8
--- /dev/null
+++ b/ios/chrome/app/theme/default_200_percent/infobar_save_password.png
Binary files differ
diff --git a/ios/chrome/app/theme/default_300_percent/infobar_save_password.png b/ios/chrome/app/theme/default_300_percent/infobar_save_password.png
new file mode 100644
index 0000000..505db3a
--- /dev/null
+++ b/ios/chrome/app/theme/default_300_percent/infobar_save_password.png
Binary files differ
diff --git a/ios/chrome/app/theme/ios_theme_resources.grd b/ios/chrome/app/theme/ios_theme_resources.grd
index 11d9a15..ce09bf7 100644
--- a/ios/chrome/app/theme/ios_theme_resources.grd
+++ b/ios/chrome/app/theme/ios_theme_resources.grd
@@ -25,8 +25,9 @@
<!-- KEEP THESE IN ALPHABETICAL ORDER! DO NOT ADD TO RANDOM PLACES JUST
BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
SAME CONDITIONALS. -->
- <structure type="chrome_scaled_image" name="IDR_IOS_INFOBAR_TRANSLATE" file="infobar_translate.png" />
<structure type="chrome_scaled_image" name="IDR_IOS_INFOBAR_AUTOLOGIN" file="infobar_autologin.png" />
+ <structure type="chrome_scaled_image" name="IDR_IOS_INFOBAR_SAVE_PASSWORD" file="infobar_save_password.png" />
+ <structure type="chrome_scaled_image" name="IDR_IOS_INFOBAR_TRANSLATE" file="infobar_translate.png" />
</structures>
</release>
</grit>