| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // (http://crbug.com/362054), or the user requested to show a password while | 212 // (http://crbug.com/362054), or the user requested to show a password while |
| 213 // a request to the store is in progress (i.e. |password_list_| | 213 // a request to the store is in progress (i.e. |password_list_| |
| 214 // is empty). Don't let it crash the browser. | 214 // is empty). Don't let it crash the browser. |
| 215 return; | 215 return; |
| 216 } | 216 } |
| 217 | 217 |
| 218 if (!IsUserAuthenticated()) { | 218 if (!IsUserAuthenticated()) { |
| 219 return; | 219 return; |
| 220 } | 220 } |
| 221 | 221 |
| 222 sync_driver::SyncService* sync_service = nullptr; | 222 syncer::SyncService* sync_service = nullptr; |
| 223 if (ProfileSyncServiceFactory::HasProfileSyncService( | 223 if (ProfileSyncServiceFactory::HasProfileSyncService( |
| 224 password_view_->GetProfile())) { | 224 password_view_->GetProfile())) { |
| 225 sync_service = | 225 sync_service = |
| 226 ProfileSyncServiceFactory::GetForProfile(password_view_->GetProfile()); | 226 ProfileSyncServiceFactory::GetForProfile(password_view_->GetProfile()); |
| 227 } | 227 } |
| 228 if (password_manager::sync_util::IsSyncAccountCredential( | 228 if (password_manager::sync_util::IsSyncAccountCredential( |
| 229 *password_list_[index], sync_service, | 229 *password_list_[index], sync_service, |
| 230 SigninManagerFactory::GetForProfile(password_view_->GetProfile()))) { | 230 SigninManagerFactory::GetForProfile(password_view_->GetProfile()))) { |
| 231 content::RecordAction( | 231 content::RecordAction( |
| 232 base::UserMetricsAction("PasswordManager_SyncCredentialShown")); | 232 base::UserMetricsAction("PasswordManager_SyncCredentialShown")); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 385 |
| 386 void PasswordManagerPresenter::PasswordExceptionListPopulater:: | 386 void PasswordManagerPresenter::PasswordExceptionListPopulater:: |
| 387 OnGetPasswordStoreResults( | 387 OnGetPasswordStoreResults( |
| 388 std::vector<std::unique_ptr<autofill::PasswordForm>> results) { | 388 std::vector<std::unique_ptr<autofill::PasswordForm>> results) { |
| 389 page_->password_exception_list_ = std::move(results); | 389 page_->password_exception_list_ = std::move(results); |
| 390 page_->SortEntriesAndHideDuplicates(&page_->password_exception_list_, | 390 page_->SortEntriesAndHideDuplicates(&page_->password_exception_list_, |
| 391 &page_->password_exception_duplicates_, | 391 &page_->password_exception_duplicates_, |
| 392 PasswordEntryType::BLACKLISTED); | 392 PasswordEntryType::BLACKLISTED); |
| 393 page_->SetPasswordExceptionList(); | 393 page_->SetPasswordExceptionList(); |
| 394 } | 394 } |
| OLD | NEW |