| 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 | 10 |
| 10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 11 #include "base/mac/scoped_cftyperef.h" | 12 #include "base/mac/scoped_cftyperef.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 | 14 |
| 14 #if defined(MAC_OS_X_VERSION_10_6) && \ | |
| 15 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | |
| 16 | |
| 17 #include <Security/SecRequirement.h> | |
| 18 | |
| 19 #else | |
| 20 | |
| 21 typedef struct __SecRequirement* SecRequirementRef; | |
| 22 typedef uint32_t SecCSFlags; | |
| 23 | |
| 24 enum { | |
| 25 kSecCSDefaultFlags = 0 | |
| 26 }; | |
| 27 | |
| 28 #endif | |
| 29 | |
| 30 namespace chrome { | 15 namespace chrome { |
| 31 namespace browser { | 16 namespace browser { |
| 32 namespace mac { | 17 namespace mac { |
| 33 | 18 |
| 34 // Wraps SecKeychainSetUserInteractionAllowed, restoring the previous setting | 19 // Wraps SecKeychainSetUserInteractionAllowed, restoring the previous setting |
| 35 // on destruction. | 20 // on destruction. |
| 36 class ScopedSecKeychainSetUserInteractionAllowed { | 21 class ScopedSecKeychainSetUserInteractionAllowed { |
| 37 public: | 22 public: |
| 38 explicit ScopedSecKeychainSetUserInteractionAllowed(Boolean allowed); | 23 explicit ScopedSecKeychainSetUserInteractionAllowed(Boolean allowed); |
| 39 ~ScopedSecKeychainSetUserInteractionAllowed(); | 24 ~ScopedSecKeychainSetUserInteractionAllowed(); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 SecKeychainItemRef CrSKeychainItemCreateFromContent( | 227 SecKeychainItemRef CrSKeychainItemCreateFromContent( |
| 243 const CrSKeychainItemAttributesAndData& attributes_and_data, | 228 const CrSKeychainItemAttributesAndData& attributes_and_data, |
| 244 SecKeychainRef keychain, | 229 SecKeychainRef keychain, |
| 245 SecAccessRef access); | 230 SecAccessRef access); |
| 246 | 231 |
| 247 } // namespace mac | 232 } // namespace mac |
| 248 } // namespace browser | 233 } // namespace browser |
| 249 } // namespace chrome | 234 } // namespace chrome |
| 250 | 235 |
| 251 #endif // CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ | 236 #endif // CHROME_BROWSER_MAC_SECURITY_WRAPPERS_H_ |
| OLD | NEW |