| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 if (update_password) { | 85 if (update_password) { |
| 86 [delegate_ showUpdatePasswordInfoBar:std::move(form_to_save)]; | 86 [delegate_ showUpdatePasswordInfoBar:std::move(form_to_save)]; |
| 87 } else { | 87 } else { |
| 88 [delegate_ showSavePasswordInfoBar:std::move(form_to_save)]; | 88 [delegate_ showSavePasswordInfoBar:std::move(form_to_save)]; |
| 89 } | 89 } |
| 90 | 90 |
| 91 return true; | 91 return true; |
| 92 } | 92 } |
| 93 | 93 |
| 94 void IOSChromePasswordManagerClient::ShowManualFallbackForSaving( |
| 95 std::unique_ptr<password_manager::PasswordFormManager> form_to_save, |
| 96 bool has_generated_password, |
| 97 bool is_update) { |
| 98 NOTIMPLEMENTED(); |
| 99 } |
| 100 |
| 101 void IOSChromePasswordManagerClient::HideManualFallbackForSaving() { |
| 102 NOTIMPLEMENTED(); |
| 103 } |
| 104 |
| 94 void IOSChromePasswordManagerClient::AutomaticPasswordSave( | 105 void IOSChromePasswordManagerClient::AutomaticPasswordSave( |
| 95 std::unique_ptr<PasswordFormManager> saved_form_manager) { | 106 std::unique_ptr<PasswordFormManager> saved_form_manager) { |
| 96 NOTIMPLEMENTED(); | 107 NOTIMPLEMENTED(); |
| 97 } | 108 } |
| 98 | 109 |
| 99 bool IOSChromePasswordManagerClient::IsIncognito() const { | 110 bool IOSChromePasswordManagerClient::IsIncognito() const { |
| 100 return (delegate_.browserState)->IsOffTheRecord(); | 111 return (delegate_.browserState)->IsOffTheRecord(); |
| 101 } | 112 } |
| 102 | 113 |
| 103 PrefService* IOSChromePasswordManagerClient::GetPrefs() { | 114 PrefService* IOSChromePasswordManagerClient::GetPrefs() { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 PasswordManagerMetricsRecorder& | 171 PasswordManagerMetricsRecorder& |
| 161 IOSChromePasswordManagerClient::GetMetricsRecorder() { | 172 IOSChromePasswordManagerClient::GetMetricsRecorder() { |
| 162 if (!metrics_recorder_) { | 173 if (!metrics_recorder_) { |
| 163 // Query source_id first, because that has the side effect of initializing | 174 // Query source_id first, because that has the side effect of initializing |
| 164 // |ukm_source_url_|. | 175 // |ukm_source_url_|. |
| 165 ukm::SourceId source_id = GetUkmSourceId(); | 176 ukm::SourceId source_id = GetUkmSourceId(); |
| 166 metrics_recorder_.emplace(GetUkmRecorder(), source_id, ukm_source_url_); | 177 metrics_recorder_.emplace(GetUkmRecorder(), source_id, ukm_source_url_); |
| 167 } | 178 } |
| 168 return metrics_recorder_.value(); | 179 return metrics_recorder_.value(); |
| 169 } | 180 } |
| OLD | NEW |