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 "ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delega
te.h" | 5 #include "ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delega
te.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "base/mac/scoped_nsobject.h" |
9 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
10 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
11 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
12 #include "components/infobars/core/infobar.h" | 13 #include "components/infobars/core/infobar.h" |
13 #include "components/infobars/core/infobar_manager.h" | 14 #include "components/infobars/core/infobar_manager.h" |
14 #include "components/password_manager/core/browser/password_form_manager.h" | 15 #include "components/password_manager/core/browser/password_form_manager.h" |
15 #include "components/password_manager/core/browser/password_manager_constants.h" | 16 #include "components/password_manager/core/browser/password_manager_constants.h" |
16 #include "components/strings/grit/components_strings.h" | 17 #include "components/strings/grit/components_strings.h" |
17 #include "ios/chrome/browser/infobars/infobar.h" | 18 #include "ios/chrome/browser/infobars/infobar.h" |
18 #import "ios/chrome/browser/passwords/update_password_infobar_controller.h" | 19 #import "ios/chrome/browser/passwords/update_password_infobar_controller.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 bool IOSChromeUpdatePasswordInfoBarDelegate::Accept() { | 98 bool IOSChromeUpdatePasswordInfoBarDelegate::Accept() { |
98 DCHECK(form_to_save()); | 99 DCHECK(form_to_save()); |
99 if (ShowMultipleAccounts()) { | 100 if (ShowMultipleAccounts()) { |
100 form_to_save()->Update( | 101 form_to_save()->Update( |
101 *form_to_save()->best_matches().at(selected_account_)); | 102 *form_to_save()->best_matches().at(selected_account_)); |
102 } else { | 103 } else { |
103 form_to_save()->Update(form_to_save()->pending_credentials()); | 104 form_to_save()->Update(form_to_save()->pending_credentials()); |
104 } | 105 } |
105 return true; | 106 return true; |
106 } | 107 } |
OLD | NEW |