| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |