| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/path_service.h" | |
| 11 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| 12 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 13 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 15 #include "chrome/browser/password_manager/password_store_mac_internal.h" | 14 #include "chrome/browser/password_manager/password_store_mac_internal.h" |
| 16 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 17 #include "components/password_manager/core/browser/password_store_consumer.h" | 16 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 18 #include "content/public/test/test_browser_thread.h" | 17 #include "content/public/test/test_browser_thread.h" |
| 19 #include "crypto/mock_apple_keychain.h" | 18 #include "crypto/mock_apple_keychain.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 ASSERT_EQ(1u, matching_items.size()); | 1435 ASSERT_EQ(1u, matching_items.size()); |
| 1437 EXPECT_EQ(ASCIIToUTF16("joe_user"), matching_items[0]->username_value); | 1436 EXPECT_EQ(ASCIIToUTF16("joe_user"), matching_items[0]->username_value); |
| 1438 matching_items.clear(); | 1437 matching_items.clear(); |
| 1439 | 1438 |
| 1440 // Check the third-party password is still there. | 1439 // Check the third-party password is still there. |
| 1441 owned_keychain_adapter.SetFindsOnlyOwnedItems(false); | 1440 owned_keychain_adapter.SetFindsOnlyOwnedItems(false); |
| 1442 matching_items.get() = owned_keychain_adapter.PasswordsFillingForm( | 1441 matching_items.get() = owned_keychain_adapter.PasswordsFillingForm( |
| 1443 "http://some.domain.com/insecure.html", PasswordForm::SCHEME_HTML); | 1442 "http://some.domain.com/insecure.html", PasswordForm::SCHEME_HTML); |
| 1444 ASSERT_EQ(1u, matching_items.size()); | 1443 ASSERT_EQ(1u, matching_items.size()); |
| 1445 } | 1444 } |
| OLD | NEW |