OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #import "ios/chrome/browser/passwords/ios_chrome_password_manager_client.h" | 5 #import "ios/chrome/browser/passwords/ios_chrome_password_manager_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "components/autofill/core/common/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 bool IOSChromePasswordManagerClient::PromptUserToChooseCredentials( | 63 bool IOSChromePasswordManagerClient::PromptUserToChooseCredentials( |
64 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, | 64 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, |
65 const GURL& origin, | 65 const GURL& origin, |
66 const CredentialsCallback& callback) { | 66 const CredentialsCallback& callback) { |
67 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
68 return false; | 68 return false; |
69 } | 69 } |
70 | 70 |
71 bool IOSChromePasswordManagerClient::PromptUserToSaveOrUpdatePassword( | 71 bool IOSChromePasswordManagerClient::PromptUserToSaveOrUpdatePassword( |
72 std::unique_ptr<PasswordFormManager> form_to_save, | 72 scoped_refptr<PasswordFormManager> form_to_save, |
73 bool update_password) { | 73 bool update_password) { |
74 if (form_to_save->IsBlacklisted()) | 74 if (form_to_save->IsBlacklisted()) |
75 return false; | 75 return false; |
76 | 76 |
77 if (update_password) { | 77 if (update_password) { |
78 [delegate_ showUpdatePasswordInfoBar:std::move(form_to_save)]; | 78 [delegate_ showUpdatePasswordInfoBar:std::move(form_to_save)]; |
79 } else { | 79 } else { |
80 [delegate_ showSavePasswordInfoBar:std::move(form_to_save)]; | 80 [delegate_ showSavePasswordInfoBar:std::move(form_to_save)]; |
81 } | 81 } |
82 | 82 |
83 return true; | 83 return true; |
84 } | 84 } |
85 | 85 |
86 void IOSChromePasswordManagerClient::AutomaticPasswordSave( | 86 void IOSChromePasswordManagerClient::AutomaticPasswordSave( |
87 std::unique_ptr<PasswordFormManager> saved_form_manager) { | 87 scoped_refptr<PasswordFormManager> saved_form_manager) { |
88 NOTIMPLEMENTED(); | 88 NOTIMPLEMENTED(); |
89 } | 89 } |
90 | 90 |
91 bool IOSChromePasswordManagerClient::IsIncognito() const { | 91 bool IOSChromePasswordManagerClient::IsIncognito() const { |
92 return (delegate_.browserState)->IsOffTheRecord(); | 92 return (delegate_.browserState)->IsOffTheRecord(); |
93 } | 93 } |
94 | 94 |
95 PrefService* IOSChromePasswordManagerClient::GetPrefs() { | 95 PrefService* IOSChromePasswordManagerClient::GetPrefs() { |
96 return (delegate_.browserState)->GetPrefs(); | 96 return (delegate_.browserState)->GetPrefs(); |
97 } | 97 } |
(...skipping 28 matching lines...) Expand all Loading... |
126 } | 126 } |
127 | 127 |
128 const GURL& IOSChromePasswordManagerClient::GetLastCommittedEntryURL() const { | 128 const GURL& IOSChromePasswordManagerClient::GetLastCommittedEntryURL() const { |
129 return delegate_.lastCommittedURL; | 129 return delegate_.lastCommittedURL; |
130 } | 130 } |
131 | 131 |
132 const password_manager::CredentialsFilter* | 132 const password_manager::CredentialsFilter* |
133 IOSChromePasswordManagerClient::GetStoreResultFilter() const { | 133 IOSChromePasswordManagerClient::GetStoreResultFilter() const { |
134 return &credentials_filter_; | 134 return &credentials_filter_; |
135 } | 135 } |
OLD | NEW |