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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_password_items_view.cc

Issue 2529093002: Hide PSL matches in the password bubble after the account chooser. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/views/passwords/manage_password_items_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
6 6
7 #include <numeric> 7 #include <numeric>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 undo_link_ = nullptr; 264 undo_link_ = nullptr;
265 } 265 }
266 266
267 // ManagePasswordItemsView 267 // ManagePasswordItemsView
268 ManagePasswordItemsView::ManagePasswordItemsView( 268 ManagePasswordItemsView::ManagePasswordItemsView(
269 ManagePasswordsBubbleModel* manage_passwords_bubble_model, 269 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
270 const std::vector<autofill::PasswordForm>* password_forms) 270 const std::vector<autofill::PasswordForm>* password_forms)
271 : model_(manage_passwords_bubble_model) { 271 : model_(manage_passwords_bubble_model) {
272 int fixed_height = PasswordFormRow::GetFixedHeight(model_->state()); 272 int fixed_height = PasswordFormRow::GetFixedHeight(model_->state());
273 for (const auto& password_form : *password_forms) { 273 for (const auto& password_form : *password_forms) {
274 if (!password_form.is_public_suffix_match) 274 password_forms_rows_.push_back(base::MakeUnique<PasswordFormRow>(
vabr (Chromium) 2016/11/25 15:07:26 What about the following situation: The user save
vasilii 2016/11/25 15:25:18 To be fixed in another place because it's platform
275 password_forms_rows_.push_back(base::MakeUnique<PasswordFormRow>( 275 this, &password_form, fixed_height));
276 this, &password_form, fixed_height));
277 } 276 }
278 AddRows(); 277 AddRows();
279 } 278 }
280 279
281 ManagePasswordItemsView::ManagePasswordItemsView( 280 ManagePasswordItemsView::ManagePasswordItemsView(
282 ManagePasswordsBubbleModel* manage_passwords_bubble_model, 281 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
283 const autofill::PasswordForm* password_form) 282 const autofill::PasswordForm* password_form)
284 : model_(manage_passwords_bubble_model) { 283 : model_(manage_passwords_bubble_model) {
285 password_forms_rows_.push_back( 284 password_forms_rows_.push_back(
286 base::MakeUnique<PasswordFormRow>(this, password_form, 0)); 285 base::MakeUnique<PasswordFormRow>(this, password_form, 0));
(...skipping 22 matching lines...) Expand all
309 deleted 308 deleted
310 ? ManagePasswordsBubbleModel::REMOVE_PASSWORD 309 ? ManagePasswordsBubbleModel::REMOVE_PASSWORD
311 : ManagePasswordsBubbleModel::ADD_PASSWORD); 310 : ManagePasswordsBubbleModel::ADD_PASSWORD);
312 } 311 }
313 312
314 void ManagePasswordItemsView::Refresh() { 313 void ManagePasswordItemsView::Refresh() {
315 DCHECK_NE(password_manager::ui::PENDING_PASSWORD_STATE, model_->state()); 314 DCHECK_NE(password_manager::ui::PENDING_PASSWORD_STATE, model_->state());
316 RemoveAllChildViews(true); 315 RemoveAllChildViews(true);
317 AddRows(); 316 AddRows();
318 } 317 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698