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 #ifndef CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ | 5 #ifndef CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ |
6 #define CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ | 6 #define CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ |
7 | 7 |
8 #include <Security/Security.h> | 8 #include <Security/Security.h> |
9 #include <Security/SecRequirement.h> | 9 #include <Security/SecRequirement.h> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 SecKeychainAttributeList* attribute_list; | 87 SecKeychainAttributeList* attribute_list; |
88 UInt32 length; | 88 UInt32 length; |
89 void* data; | 89 void* data; |
90 }; | 90 }; |
91 | 91 |
92 // Holds a CrSKeychainItemAttributesAndData*, calling | 92 // Holds a CrSKeychainItemAttributesAndData*, calling |
93 // CrSKeychainItemFreeAttributesAndData and freeing the owned | 93 // CrSKeychainItemFreeAttributesAndData and freeing the owned |
94 // CrSKeychainItemAttributesAndData* on destruction. | 94 // CrSKeychainItemAttributesAndData* on destruction. |
95 class ScopedCrSKeychainItemAttributesAndData { | 95 class ScopedCrSKeychainItemAttributesAndData { |
96 public: | 96 public: |
97 ScopedCrSKeychainItemAttributesAndData( | 97 explicit ScopedCrSKeychainItemAttributesAndData( |
98 CrSKeychainItemAttributesAndData* attributes_and_data); | 98 CrSKeychainItemAttributesAndData* attributes_and_data); |
99 ~ScopedCrSKeychainItemAttributesAndData(); | 99 ~ScopedCrSKeychainItemAttributesAndData(); |
100 | 100 |
101 CrSKeychainItemAttributesAndData* get() const { | 101 CrSKeychainItemAttributesAndData* get() const { |
102 return attributes_and_data_.get(); | 102 return attributes_and_data_.get(); |
103 } | 103 } |
104 | 104 |
105 CrSKeychainItemAttributesAndData* release() { | 105 CrSKeychainItemAttributesAndData* release() { |
106 return attributes_and_data_.release(); | 106 return attributes_and_data_.release(); |
107 } | 107 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 SecKeychainItemRef CrSKeychainItemCreateFromContent( | 227 SecKeychainItemRef CrSKeychainItemCreateFromContent( |
228 const CrSKeychainItemAttributesAndData& attributes_and_data, | 228 const CrSKeychainItemAttributesAndData& attributes_and_data, |
229 SecKeychainRef keychain, | 229 SecKeychainRef keychain, |
230 SecAccessRef access); | 230 SecAccessRef access); |
231 | 231 |
232 } // namespace mac | 232 } // namespace mac |
233 } // namespace browser | 233 } // namespace browser |
234 } // namespace chrome | 234 } // namespace chrome |
235 | 235 |
236 #endif // CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ | 236 #endif // CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ |
OLD | NEW |