Respect Android system settings for allowing the last character of a password to be displayed.

This CL is only the Chromium part of the whole change, i.e. does not include Android changes.

BUG=148796

Review URL: https://chromiumcodereview.appspot.com/15937004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204032 0039d316-1c4b-4281-b951-d872f2087c98
parent 80373b6e
......@@ -1949,7 +1949,13 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
#endif
#endif
#if defined(OS_ANDROID)
web_prefs->password_echo_enabled =
prefs->GetBoolean(prefs::kWebKitPasswordEchoEnabled);
#else
web_prefs->password_echo_enabled = browser_defaults::kPasswordEchoEnabled;
#endif
#if defined(OS_CHROMEOS)
// Enable password echo during OOBE when keyboard driven flag is set.
if (chromeos::UserManager::IsInitialized() &&
......
......@@ -79,9 +79,7 @@ const ui::ResourceBundle::FontStyle kAssociatedNetworkFontStyle =
const int kInfoBarBorderPaddingVertical = 5;
#if defined(OS_ANDROID)
const bool kPasswordEchoEnabled = true;
#else
#if !defined(OS_ANDROID)
const bool kPasswordEchoEnabled = false;
#endif
......
......@@ -122,6 +122,7 @@ const char* kPrefsToObserve[] = {
#if defined(OS_ANDROID)
prefs::kWebKitFontScaleFactor,
prefs::kWebKitForceEnableZoom,
prefs::kWebKitPasswordEchoEnabled,
#endif
prefs::kWebKitJavascriptEnabled,
prefs::kWebKitJavaEnabled,
......@@ -556,6 +557,10 @@ void PrefsTabHelper::RegisterUserPrefs(
prefs::kWebKitForceEnableZoom,
pref_defaults.force_enable_zoom,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterBooleanPref(
prefs::kWebKitPasswordEchoEnabled,
pref_defaults.password_echo_enabled,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
#endif
registry->RegisterLocalizedStringPref(
prefs::kAcceptLanguages,
......
......@@ -273,6 +273,8 @@ const char kWebKitAllowRunningInsecureContent[] =
#if defined(OS_ANDROID)
const char kWebKitFontScaleFactor[] = "webkit.webprefs.font_scale_factor";
const char kWebKitForceEnableZoom[] = "webkit.webprefs.force_enable_zoom";
const char kWebKitPasswordEchoEnabled[] =
"webkit.webprefs.password_echo_enabled";
#endif
const char kWebKitCommonScript[] = "Zyyy";
......
......@@ -145,6 +145,7 @@ extern const char kWebKitAllowRunningInsecureContent[];
#if defined(OS_ANDROID)
extern const char kWebKitFontScaleFactor[];
extern const char kWebKitForceEnableZoom[];
extern const char kWebKitPasswordEchoEnabled[];
#endif
extern const char kPasswordGenerationEnabled[];
extern const char kPasswordManagerEnabled[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment