OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_manager_presenter.h" | 5 #include "chrome/browser/ui/passwords/password_manager_presenter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/metrics/user_metrics_action.h" | 9 #include "base/metrics/user_metrics_action.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 return; | 122 return; |
123 } | 123 } |
124 if (IsAuthenticationRequired()) { | 124 if (IsAuthenticationRequired()) { |
125 if (password_manager_util::AuthenticateUser( | 125 if (password_manager_util::AuthenticateUser( |
126 password_view_->GetNativeWindow())) | 126 password_view_->GetNativeWindow())) |
127 last_authentication_time_ = base::TimeTicks::Now(); | 127 last_authentication_time_ = base::TimeTicks::Now(); |
128 else | 128 else |
129 return; | 129 return; |
130 } | 130 } |
131 | 131 |
132 if (password_manager_sync_metrics::IsPasswordSyncAccountCredential( | 132 if (password_manager_sync_metrics::IsSyncAccountCredential( |
133 password_view_->GetProfile(), | 133 password_view_->GetProfile(), |
134 base::UTF16ToUTF8(password_list_[index]->username_value), | 134 base::UTF16ToUTF8(password_list_[index]->username_value), |
135 password_list_[index]->signon_realm)) { | 135 password_list_[index]->signon_realm)) { |
136 content::RecordAction( | 136 content::RecordAction( |
137 base::UserMetricsAction("PasswordManager_SyncCredentialShown")); | 137 base::UserMetricsAction("PasswordManager_SyncCredentialShown")); |
138 } | 138 } |
139 | 139 |
140 // Call back the front end to reveal the password. | 140 // Call back the front end to reveal the password. |
141 password_view_->ShowPassword(index, password_list_[index]->password_value); | 141 password_view_->ShowPassword(index, password_list_[index]->password_value); |
142 #endif | 142 #endif |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 void PasswordManagerPresenter::PasswordExceptionListPopulater:: | 234 void PasswordManagerPresenter::PasswordExceptionListPopulater:: |
235 OnGetPasswordStoreResults( | 235 OnGetPasswordStoreResults( |
236 const std::vector<autofill::PasswordForm*>& results) { | 236 const std::vector<autofill::PasswordForm*>& results) { |
237 page_->password_exception_list_.clear(); | 237 page_->password_exception_list_.clear(); |
238 page_->password_exception_list_.insert(page_->password_exception_list_.end(), | 238 page_->password_exception_list_.insert(page_->password_exception_list_.end(), |
239 results.begin(), results.end()); | 239 results.begin(), results.end()); |
240 page_->SetPasswordExceptionList(); | 240 page_->SetPasswordExceptionList(); |
241 } | 241 } |
OLD | NEW |