Commit 2ada4ed3 authored by wfh@chromium.org's avatar wfh@chromium.org

Disable ability to show passwords when running in Metro.

BUG=326493

Review URL: https://codereview.chromium.org/107023009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241122 0039d316-1c4b-4281-b951-d872f2087c98
parent eb42b637
......@@ -279,7 +279,12 @@ cr.define('options.passwordManager', function() {
/** @override */
createItem: function(entry) {
return new PasswordListItem(this.dataModel, entry, this.showPasswords_);
var showPasswords = this.showPasswords_;
if (loadTimeData.getBoolean('disableShowPasswords'))
showPasswords = false;
return new PasswordListItem(this.dataModel, entry, showPasswords);
},
/** @override */
......
......@@ -11,6 +11,9 @@
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#if defined(OS_WIN) && defined(USE_ASH)
#include "chrome/browser/ui/ash/ash_util.h"
#endif
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/core/common/password_form.h"
......@@ -69,6 +72,18 @@ void PasswordManagerHandler::GetLocalizedValues(
localized_strings->SetString("passwordManagerLearnMoreURL",
chrome::kPasswordManagerLearnMoreURL);
bool disable_show_passwords = false;
#if defined(OS_WIN) && defined(USE_ASH)
// We disable the ability to show passwords when running in Windows Metro
// interface. This is because we cannot pop native Win32 dialogs from the
// Metro process.
// TODO(wfh): Revisit this if Metro usage grows.
if (chrome::IsNativeWindowInAsh(GetNativeWindow()))
disable_show_passwords = true;
#endif
localized_strings->SetBoolean("disableShowPasswords", disable_show_passwords);
}
void PasswordManagerHandler::RegisterMessages() {
......
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