Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2279163002: cros: Bind password echo with TouchView mode
Patch Set: do not run for mash to fix mash test Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/chrome_browser_main_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 052e416edc16625d2124eea434a349cd12d68c35..02ccd44dc51916387ac7b9dae675cfebf2849a5c 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -208,6 +208,7 @@
#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/system/input_device_settings.h"
+#include "chrome/browser/chromeos/ui/password_echo_controller.h"
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chromeos/chromeos_switches.h"
@@ -2402,6 +2403,12 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
#if defined(OS_ANDROID)
web_prefs->password_echo_enabled =
prefs->GetBoolean(prefs::kWebKitPasswordEchoEnabled);
+#elif defined(OS_CHROMEOS)
+ // PasswordEchoController is null for mash and unit tests.
+ web_prefs->password_echo_enabled =
+ chromeos::PasswordEchoController::Get()
+ ? chromeos::PasswordEchoController::Get()->enabled()
+ : browser_defaults::kPasswordEchoEnabled;
#else
web_prefs->password_echo_enabled = browser_defaults::kPasswordEchoEnabled;
#endif
« no previous file with comments | « no previous file | chrome/browser/chromeos/chrome_browser_main_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698