| 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 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 store_->login_metadata_db()->set_clear_password_values(false); | 228 store_->login_metadata_db()->set_clear_password_values(false); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void PasswordStoreMacTestDelegate::ClosePasswordStore() { | 231 void PasswordStoreMacTestDelegate::ClosePasswordStore() { |
| 232 store_->ShutdownOnUIThread(); | 232 store_->ShutdownOnUIThread(); |
| 233 FinishAsyncProcessing(); | 233 FinishAsyncProcessing(); |
| 234 OSCryptMocker::TearDown(); | 234 OSCryptMocker::TearDown(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 base::FilePath PasswordStoreMacTestDelegate::test_login_db_file_path() const { | 237 base::FilePath PasswordStoreMacTestDelegate::test_login_db_file_path() const { |
| 238 return db_dir_.path().Append(FILE_PATH_LITERAL("login.db")); | 238 return db_dir_.GetPath().Append(FILE_PATH_LITERAL("login.db")); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace | 241 } // namespace |
| 242 | 242 |
| 243 namespace password_manager { | 243 namespace password_manager { |
| 244 | 244 |
| 245 INSTANTIATE_TYPED_TEST_CASE_P(Mac, | 245 INSTANTIATE_TYPED_TEST_CASE_P(Mac, |
| 246 PasswordStoreOriginTest, | 246 PasswordStoreOriginTest, |
| 247 PasswordStoreMacTestDelegate); | 247 PasswordStoreMacTestDelegate); |
| 248 | 248 |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 store()->GetLogins(query_form, &mock_consumer); | 1359 store()->GetLogins(query_form, &mock_consumer); |
| 1360 base::RunLoop().Run(); | 1360 base::RunLoop().Run(); |
| 1361 ::testing::Mock::VerifyAndClearExpectations(&mock_consumer); | 1361 ::testing::Mock::VerifyAndClearExpectations(&mock_consumer); |
| 1362 EXPECT_EQ(form, returned_form); | 1362 EXPECT_EQ(form, returned_form); |
| 1363 | 1363 |
| 1364 store()->RemoveLogin(form); | 1364 store()->RemoveLogin(form); |
| 1365 } | 1365 } |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 base::FilePath test_login_db_file_path() const { | 1368 base::FilePath test_login_db_file_path() const { |
| 1369 return db_dir_.path().Append(FILE_PATH_LITERAL("login.db")); | 1369 return db_dir_.GetPath().Append(FILE_PATH_LITERAL("login.db")); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 password_manager::LoginDatabase* login_db() const { | 1372 password_manager::LoginDatabase* login_db() const { |
| 1373 return store_->login_metadata_db(); | 1373 return store_->login_metadata_db(); |
| 1374 } | 1374 } |
| 1375 | 1375 |
| 1376 MockAppleKeychain* keychain() { | 1376 MockAppleKeychain* keychain() { |
| 1377 return static_cast<MockAppleKeychain*>(store_->keychain()); | 1377 return static_cast<MockAppleKeychain*>(store_->keychain()); |
| 1378 } | 1378 } |
| 1379 | 1379 |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 histogram_tester_->ExpectUniqueSample( | 2088 histogram_tester_->ExpectUniqueSample( |
| 2089 "PasswordManager.KeychainMigration.NumPasswordsOnFailure", 1, 1); | 2089 "PasswordManager.KeychainMigration.NumPasswordsOnFailure", 1, 1); |
| 2090 histogram_tester_->ExpectUniqueSample( | 2090 histogram_tester_->ExpectUniqueSample( |
| 2091 "PasswordManager.KeychainMigration.NumFailedPasswords", 1, 1); | 2091 "PasswordManager.KeychainMigration.NumFailedPasswords", 1, 1); |
| 2092 histogram_tester_->ExpectUniqueSample( | 2092 histogram_tester_->ExpectUniqueSample( |
| 2093 "PasswordManager.KeychainMigration.NumChromeOwnedInaccessiblePasswords", | 2093 "PasswordManager.KeychainMigration.NumChromeOwnedInaccessiblePasswords", |
| 2094 2, 1); | 2094 2, 1); |
| 2095 // Don't test the encryption key access. | 2095 // Don't test the encryption key access. |
| 2096 histogram_tester_.reset(); | 2096 histogram_tester_.reset(); |
| 2097 } | 2097 } |
| OLD | NEW |