| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef NET_CERT_KEYCHAIN_SEARCH_LIST_MAC_H_ | 5 #ifndef NET_CERT_KEYCHAIN_SEARCH_LIST_MAC_H_ |
| 6 #define NET_CERT_KEYCHAIN_SEARCH_LIST_MAC_H_ | 6 #define NET_CERT_KEYCHAIN_SEARCH_LIST_MAC_H_ |
| 7 | 7 |
| 8 #include <CoreServices/CoreServices.h> | 8 #include <CoreServices/CoreServices.h> |
| 9 #include <Security/Security.h> | 9 #include <Security/Security.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // if one exists already. | 23 // if one exists already. |
| 24 static std::unique_ptr<TestKeychainSearchList> Create(); | 24 static std::unique_ptr<TestKeychainSearchList> Create(); |
| 25 | 25 |
| 26 // Returns true if a TestKeychainSearchList currently exists. | 26 // Returns true if a TestKeychainSearchList currently exists. |
| 27 static bool HasInstance(); | 27 static bool HasInstance(); |
| 28 | 28 |
| 29 // Returns the current TestKeychainSearchList instance, if any. | 29 // Returns the current TestKeychainSearchList instance, if any. |
| 30 static TestKeychainSearchList* GetInstance(); | 30 static TestKeychainSearchList* GetInstance(); |
| 31 | 31 |
| 32 // Copies the test keychain search list into |keychain_search_list|. | 32 // Copies the test keychain search list into |keychain_search_list|. |
| 33 OSStatus CopySearchList(CFArrayRef* keychain_search_list) const; | 33 OSStatus CopySearchList( |
| 34 base::ScopedCFTypeRef<CFArrayRef>* keychain_search_list) const; |
| 34 | 35 |
| 35 // Adds |keychain| to the end of the test keychain search list. | 36 // Adds |keychain| to the end of the test keychain search list. |
| 36 void AddKeychain(SecKeychainRef keychain); | 37 void AddKeychain(SecKeychainRef keychain); |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 TestKeychainSearchList(); | 40 TestKeychainSearchList(); |
| 40 | 41 |
| 41 base::ScopedCFTypeRef<CFMutableArrayRef> scoped_keychain_search_list; | 42 base::ScopedCFTypeRef<CFMutableArrayRef> scoped_keychain_search_list; |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 } // namespace net | 45 } // namespace net |
| 45 | 46 |
| 46 #endif // NET_CERT_KEYCHAIN_SEARCH_LIST_MAC_H_ | 47 #endif // NET_CERT_KEYCHAIN_SEARCH_LIST_MAC_H_ |
| OLD | NEW |