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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc

Issue 2078253002: vector<unique_ptr> for PasswordFormManager::blacklisted_matches_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UI controller Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ui_controller.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); 346 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE);
347 UpdateBubbleAndIconVisibility(); 347 UpdateBubbleAndIconVisibility();
348 } 348 }
349 } 349 }
350 350
351 void ManagePasswordsUIController::SavePasswordInternal() { 351 void ManagePasswordsUIController::SavePasswordInternal() {
352 password_manager::PasswordStore* password_store = 352 password_manager::PasswordStore* password_store =
353 GetPasswordStore(web_contents()); 353 GetPasswordStore(web_contents());
354 password_manager::PasswordFormManager* form_manager = 354 password_manager::PasswordFormManager* form_manager =
355 passwords_data_.form_manager(); 355 passwords_data_.form_manager();
356 for (const autofill::PasswordForm* form : 356 for (const auto& form : form_manager->blacklisted_matches()) {
357 form_manager->blacklisted_matches()) {
358 password_store->RemoveLogin(*form); 357 password_store->RemoveLogin(*form);
359 } 358 }
360 359
361 form_manager->Save(); 360 form_manager->Save();
362 } 361 }
363 362
364 void ManagePasswordsUIController::UpdatePasswordInternal( 363 void ManagePasswordsUIController::UpdatePasswordInternal(
365 const autofill::PasswordForm& password_form) { 364 const autofill::PasswordForm& password_form) {
366 password_manager::PasswordFormManager* form_manager = 365 password_manager::PasswordFormManager* form_manager =
367 passwords_data_.form_manager(); 366 passwords_data_.form_manager();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); 438 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE);
440 } 439 }
441 } 440 }
442 441
443 void ManagePasswordsUIController::WebContentsDestroyed() { 442 void ManagePasswordsUIController::WebContentsDestroyed() {
444 password_manager::PasswordStore* password_store = 443 password_manager::PasswordStore* password_store =
445 GetPasswordStore(web_contents()); 444 GetPasswordStore(web_contents());
446 if (password_store) 445 if (password_store)
447 password_store->RemoveObserver(this); 446 password_store->RemoveObserver(this);
448 } 447 }
OLDNEW
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698