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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc

Issue 1409223005: Change the password bubble on Mac so the columns are resized dynamically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the crash Created 5 years, 2 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 | « chrome/browser/ui/passwords/manage_passwords_bubble_model.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
index 869dac9b052c6936882e494e3d4454e81fe9b0c6..9624cbc62f55074dffaeaae412b6d9dcf7edf956 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -34,7 +34,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
using autofill::PasswordFormMap;
using feedback::FeedbackData;
@@ -43,19 +42,6 @@ namespace metrics_util = password_manager::metrics_util;
namespace {
-enum FieldType { USERNAME_FIELD, PASSWORD_FIELD };
-
-const int kUsernameFieldSize = 30;
-const int kPasswordFieldSize = 22;
-
-// Returns the width of |type| field.
-int GetFieldWidth(FieldType type) {
- return ui::ResourceBundle::GetSharedInstance()
- .GetFontList(ui::ResourceBundle::SmallFont)
- .GetExpectedTextWidth(type == USERNAME_FIELD ? kUsernameFieldSize
- : kPasswordFieldSize);
-}
-
Profile* GetProfileFromWebContents(content::WebContents* web_contents) {
if (!web_contents)
return nullptr;
@@ -366,16 +352,6 @@ bool ManagePasswordsBubbleModel::ShouldShowGoogleSmartLockWelcome() const {
return false;
}
-// static
-int ManagePasswordsBubbleModel::UsernameFieldWidth() {
- return GetFieldWidth(USERNAME_FIELD);
-}
-
-// static
-int ManagePasswordsBubbleModel::PasswordFieldWidth() {
- return GetFieldWidth(PASSWORD_FIELD);
-}
-
void ManagePasswordsBubbleModel::UpdatePendingStateTitle() {
title_brand_link_range_ = gfx::Range();
GetSavePasswordDialogTitleTextAndLinkRange(
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_bubble_model.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698