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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/password_dialog_controller_impl.h" 5 #include "chrome/browser/ui/passwords/password_dialog_controller_impl.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/sync/profile_sync_service_factory.h" 8 #include "chrome/browser/sync/profile_sync_service_factory.h"
9 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" 9 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
10 #include "chrome/browser/ui/passwords/password_dialog_prompts.h" 10 #include "chrome/browser/ui/passwords/password_dialog_prompts.h"
(...skipping 25 matching lines...) Expand all
36 account_chooser_dialog_(nullptr), 36 account_chooser_dialog_(nullptr),
37 autosignin_dialog_(nullptr) { 37 autosignin_dialog_(nullptr) {
38 } 38 }
39 39
40 PasswordDialogControllerImpl::~PasswordDialogControllerImpl() { 40 PasswordDialogControllerImpl::~PasswordDialogControllerImpl() {
41 ResetDialog(); 41 ResetDialog();
42 } 42 }
43 43
44 void PasswordDialogControllerImpl::ShowAccountChooser( 44 void PasswordDialogControllerImpl::ShowAccountChooser(
45 AccountChooserPrompt* dialog, 45 AccountChooserPrompt* dialog,
46 std::vector<scoped_ptr<autofill::PasswordForm>> locals, 46 std::vector<std::unique_ptr<autofill::PasswordForm>> locals,
47 std::vector<scoped_ptr<autofill::PasswordForm>> federations) { 47 std::vector<std::unique_ptr<autofill::PasswordForm>> federations) {
48 DCHECK(!account_chooser_dialog_); 48 DCHECK(!account_chooser_dialog_);
49 DCHECK(!autosignin_dialog_); 49 DCHECK(!autosignin_dialog_);
50 DCHECK(dialog); 50 DCHECK(dialog);
51 local_credentials_.swap(locals); 51 local_credentials_.swap(locals);
52 federated_credentials_.swap(federations); 52 federated_credentials_.swap(federations);
53 account_chooser_dialog_ = dialog; 53 account_chooser_dialog_ = dialog;
54 account_chooser_dialog_->ShowAccountChooser(); 54 account_chooser_dialog_->ShowAccountChooser();
55 } 55 }
56 56
57 void PasswordDialogControllerImpl::ShowAutosigninPrompt( 57 void PasswordDialogControllerImpl::ShowAutosigninPrompt(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void PasswordDialogControllerImpl::ResetDialog() { 151 void PasswordDialogControllerImpl::ResetDialog() {
152 if (account_chooser_dialog_) { 152 if (account_chooser_dialog_) {
153 account_chooser_dialog_->ControllerGone(); 153 account_chooser_dialog_->ControllerGone();
154 account_chooser_dialog_ = nullptr; 154 account_chooser_dialog_ = nullptr;
155 } 155 }
156 if (autosignin_dialog_) { 156 if (autosignin_dialog_) {
157 autosignin_dialog_->ControllerGone(); 157 autosignin_dialog_->ControllerGone();
158 autosignin_dialog_ = nullptr; 158 autosignin_dialog_ = nullptr;
159 } 159 }
160 } 160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698