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

Unified Diff: chrome/browser/ui/webui/options/password_manager_handler.cc

Issue 107023009: Disable ability to show passwords when running in Metro. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment. Always set boolean value. Created 7 years 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 | « chrome/browser/resources/options/password_manager_list.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/password_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index b605282504179148b4304073bb8de6e025aeffd9..ed2c1c8a2e5e3dd712879ef270f5e907ff63e672 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -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() {
« no previous file with comments | « chrome/browser/resources/options/password_manager_list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698