Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/keychain_mac.h

Issue 115658: First phase of Mac Keychain integration. For the overall plan, see the design... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/keychain_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_KEYCHAIN_MAC_H_
6 #define CHROME_BROWSER_KEYCHAIN_MAC_H_
7
8 #include <Security/Security.h>
9
10 #include "base/basictypes.h"
11
12 // Wraps the KeychainServices API in a very thin layer, to allow it to be
13 // mocked out for testing.
14
15 // See Keychain Services documentation for function documentation, as these call
16 // through directly to their Keychain Services equivalents (Foo ->
17 // SecKeychainFoo). The only exception is Free, which should be used for
18 // anything returned from this class that would normally be freed with
19 // CFRelease (to aid in testing).
20 class MacKeychain {
21 public:
22 MacKeychain() {}
23 virtual ~MacKeychain() {}
24
25 virtual OSStatus ItemCopyAttributesAndData(
26 SecKeychainItemRef itemRef, SecKeychainAttributeInfo *info,
27 SecItemClass *itemClass, SecKeychainAttributeList **attrList,
28 UInt32 *length, void **outData) const;
29
30 virtual OSStatus ItemFreeAttributesAndData(SecKeychainAttributeList *attrList,
31 void *data) const;
32
33 virtual OSStatus SearchCreateFromAttributes(
34 CFTypeRef keychainOrArray, SecItemClass itemClass,
35 const SecKeychainAttributeList *attrList,
36 SecKeychainSearchRef *searchRef) const;
37
38 virtual OSStatus SearchCopyNext(SecKeychainSearchRef searchRef,
39 SecKeychainItemRef *itemRef) const;
40
41 // Calls CFRelease on the given ref, after checking that |ref| is non-NULL.
42 virtual void Free(CFTypeRef ref) const;
43
44 private:
45 DISALLOW_COPY_AND_ASSIGN(MacKeychain);
46 };
47
48 #endif // CHROME_BROWSER_KEYCHAIN_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/keychain_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698