| 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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 PasswordStoreMac::PasswordStoreMac( | 917 PasswordStoreMac::PasswordStoreMac( |
| 918 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, | 918 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, |
| 919 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, | 919 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
| 920 scoped_ptr<AppleKeychain> keychain, | 920 scoped_ptr<AppleKeychain> keychain, |
| 921 scoped_ptr<password_manager::LoginDatabase> login_db) | 921 scoped_ptr<password_manager::LoginDatabase> login_db) |
| 922 : password_manager::PasswordStore(main_thread_runner, db_thread_runner), | 922 : password_manager::PasswordStore(main_thread_runner, db_thread_runner), |
| 923 keychain_(keychain.Pass()), | 923 keychain_(keychain.Pass()), |
| 924 login_metadata_db_(login_db.Pass()) { | 924 login_metadata_db_(login_db.Pass()) { |
| 925 DCHECK(keychain_.get()); | 925 DCHECK(keychain_.get()); |
| 926 DCHECK(login_metadata_db_.get()); | 926 DCHECK(login_metadata_db_.get()); |
| 927 login_metadata_db_->set_clear_password_values(true); |
| 927 } | 928 } |
| 928 | 929 |
| 929 PasswordStoreMac::~PasswordStoreMac() {} | 930 PasswordStoreMac::~PasswordStoreMac() {} |
| 930 | 931 |
| 931 bool PasswordStoreMac::Init( | 932 bool PasswordStoreMac::Init( |
| 932 const syncer::SyncableService::StartSyncFlare& flare) { | 933 const syncer::SyncableService::StartSyncFlare& flare) { |
| 933 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 934 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 934 thread_.reset(new base::Thread("Chrome_PasswordStore_Thread")); | 935 thread_.reset(new base::Thread("Chrome_PasswordStore_Thread")); |
| 935 | 936 |
| 936 if (!thread_->Start()) { | 937 if (!thread_->Start()) { |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 ScopedVector<PasswordForm> forms_with_keychain_entry; | 1247 ScopedVector<PasswordForm> forms_with_keychain_entry; |
| 1247 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, | 1248 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, |
| 1248 &forms_with_keychain_entry); | 1249 &forms_with_keychain_entry); |
| 1249 | 1250 |
| 1250 // Clean up any orphaned database entries. | 1251 // Clean up any orphaned database entries. |
| 1251 RemoveDatabaseForms(&database_forms); | 1252 RemoveDatabaseForms(&database_forms); |
| 1252 | 1253 |
| 1253 // Move the orphaned DB forms to the output parameter. | 1254 // Move the orphaned DB forms to the output parameter. |
| 1254 AppendSecondToFirst(orphaned_forms, &database_forms); | 1255 AppendSecondToFirst(orphaned_forms, &database_forms); |
| 1255 } | 1256 } |
| OLD | NEW |