Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
| 6 | 6 |
| 7 #include "chrome/browser/password_manager/password_store_factory.h" | 7 #include "chrome/browser/password_manager/password_store_factory.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
| 10 #include "chrome/browser/ui/chrome_pages.h" | 10 #include "chrome/browser/ui/chrome_pages.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 autofill::PasswordForm password_form) { | 92 autofill::PasswordForm password_form) { |
| 93 ManagePasswordsBubbleUIController::FromWebContents(web_contents_)-> | 93 ManagePasswordsBubbleUIController::FromWebContents(web_contents_)-> |
| 94 RemoveFromBestMatches(password_form); | 94 RemoveFromBestMatches(password_form); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void ManagePasswordsBubbleModel::WebContentsDestroyed( | 97 void ManagePasswordsBubbleModel::WebContentsDestroyed( |
| 98 content::WebContents* web_contents) { | 98 content::WebContents* web_contents) { |
| 99 // The WebContents have been destroyed. | 99 // The WebContents have been destroyed. |
| 100 web_contents_ = NULL; | 100 web_contents_ = NULL; |
| 101 } | 101 } |
| 102 | |
| 103 // static | |
| 104 base::string16 ManagePasswordsBubbleModel::GetPasswordDisplayString( | |
|
Patrick Dubroy
2014/04/02 09:41:50
I definitely think adding some tests for the Manag
| |
| 105 const base::string16& password) { | |
| 106 const wchar_t kPasswordBullet = 0x2022; | |
| 107 const size_t kMaxPasswordChar = 22; | |
| 108 return base::string16(std::min(password.length(), kMaxPasswordChar), | |
| 109 kPasswordBullet); | |
| 110 } | |
| OLD | NEW |