| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/password_manager/password_store_mac.h" | 5 #include "chrome/browser/password_manager/password_store_mac.h" |
| 6 #include "chrome/browser/password_manager/password_store_mac_internal.h" | 6 #include "chrome/browser/password_manager/password_store_mac_internal.h" |
| 7 | 7 |
| 8 #include <CoreServices/CoreServices.h> | 8 #include <CoreServices/CoreServices.h> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 password_manager::PasswordStore::Shutdown(); | 956 password_manager::PasswordStore::Shutdown(); |
| 957 thread_->Stop(); | 957 thread_->Stop(); |
| 958 } | 958 } |
| 959 | 959 |
| 960 // Mac stores passwords in the system keychain, which can block for an | 960 // Mac stores passwords in the system keychain, which can block for an |
| 961 // arbitrarily long time (most notably, it can block on user confirmation | 961 // arbitrarily long time (most notably, it can block on user confirmation |
| 962 // from a dialog). Run tasks on a dedicated thread to avoid blocking the DB | 962 // from a dialog). Run tasks on a dedicated thread to avoid blocking the DB |
| 963 // thread. | 963 // thread. |
| 964 scoped_refptr<base::SingleThreadTaskRunner> | 964 scoped_refptr<base::SingleThreadTaskRunner> |
| 965 PasswordStoreMac::GetBackgroundTaskRunner() { | 965 PasswordStoreMac::GetBackgroundTaskRunner() { |
| 966 return (thread_.get()) ? thread_->message_loop_proxy() : NULL; | 966 return (thread_.get()) ? thread_->task_runner() : NULL; |
| 967 } | 967 } |
| 968 | 968 |
| 969 void PasswordStoreMac::ReportMetricsImpl(const std::string& sync_username, | 969 void PasswordStoreMac::ReportMetricsImpl(const std::string& sync_username, |
| 970 bool custom_passphrase_sync_enabled) { | 970 bool custom_passphrase_sync_enabled) { |
| 971 if (!login_metadata_db_) | 971 if (!login_metadata_db_) |
| 972 return; | 972 return; |
| 973 login_metadata_db_->ReportMetrics(sync_username, | 973 login_metadata_db_->ReportMetrics(sync_username, |
| 974 custom_passphrase_sync_enabled); | 974 custom_passphrase_sync_enabled); |
| 975 } | 975 } |
| 976 | 976 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 ScopedVector<PasswordForm> forms_with_keychain_entry; | 1246 ScopedVector<PasswordForm> forms_with_keychain_entry; |
| 1247 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, | 1247 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, |
| 1248 &forms_with_keychain_entry); | 1248 &forms_with_keychain_entry); |
| 1249 | 1249 |
| 1250 // Clean up any orphaned database entries. | 1250 // Clean up any orphaned database entries. |
| 1251 RemoveDatabaseForms(&database_forms); | 1251 RemoveDatabaseForms(&database_forms); |
| 1252 | 1252 |
| 1253 // Move the orphaned DB forms to the output parameter. | 1253 // Move the orphaned DB forms to the output parameter. |
| 1254 AppendSecondToFirst(orphaned_forms, &database_forms); | 1254 AppendSecondToFirst(orphaned_forms, &database_forms); |
| 1255 } | 1255 } |
| OLD | NEW |