Index: crypto/mock_keychain_mac.h |
=================================================================== |
--- crypto/mock_keychain_mac.h (revision 145645) |
+++ crypto/mock_keychain_mac.h (working copy) |
@@ -150,34 +150,41 @@ |
SecProtocolType protocol, |
SecAuthenticationType authenticationType) const; |
// Initializes storage for keychain data at |key|. |
- void InitializeKeychainData(unsigned int key) const; |
+ void InitializeKeychainData(uintptr_t key) const; |
// Sets the data and length of |tag| in the item-th test item. |
- void SetTestDataBytes(int item, UInt32 tag, const void* data, size_t length); |
+ void SetTestDataBytes( |
+ uintptr_t item, |
+ UInt32 tag, |
+ const void* data, |
+ size_t length); |
// Sets the data and length of |tag| in the item-th test item based on |
// |value|. The null-terminator will not be included; the Keychain Services |
// docs don't indicate whether it is or not, so clients should not assume |
// that it will be. |
- void SetTestDataString(int item, UInt32 tag, const char* value); |
+ void SetTestDataString(uintptr_t item, UInt32 tag, const char* value); |
// Sets the data of the corresponding attribute of the item-th test item to |
// |value|. Assumes that the space has alread been allocated, and the length |
// set. |
- void SetTestDataPort(int item, UInt32 value); |
- void SetTestDataProtocol(int item, SecProtocolType value); |
- void SetTestDataAuthType(int item, SecAuthenticationType value); |
- void SetTestDataNegativeItem(int item, Boolean value); |
- void SetTestDataCreator(int item, OSType value); |
+ void SetTestDataPort(uintptr_t item, UInt32 value); |
+ void SetTestDataProtocol(uintptr_t item, SecProtocolType value); |
+ void SetTestDataAuthType(uintptr_t item, SecAuthenticationType value); |
+ void SetTestDataNegativeItem(uintptr_t item, Boolean value); |
+ void SetTestDataCreator(uintptr_t item, OSType value); |
// Sets the password data and length for the item-th test item. |
- void SetTestDataPasswordBytes(int item, const void* data, size_t length); |
+ void SetTestDataPasswordBytes( |
+ uintptr_t item, |
+ const void* data, |
+ size_t length); |
// Sets the password for the item-th test item. As with SetTestDataString, |
// the data will not be null-terminated. |
- void SetTestDataPasswordString(int item, const char* value); |
+ void SetTestDataPasswordString(uintptr_t item, const char* value); |
// Returns the address of the attribute in attribute_list with tag |tag|. |
static SecKeychainAttribute* AttributeWithTag( |
const SecKeychainAttributeList& attribute_list, |
UInt32 tag); |
- static const int kDummySearchRef = 1000; |
+ static const uintptr_t kDummySearchRef = 1000; |
typedef struct KeychainPasswordData { |
KeychainPasswordData() : data(NULL), length(0) {} |
@@ -187,15 +194,15 @@ |
// Mutable because the MockKeychain API requires its internal keychain storage |
// to be modifiable by users of this class. |
- mutable std::map<unsigned int, SecKeychainAttributeList> keychain_attr_list_; |
- mutable std::map<unsigned int, KeychainPasswordData> keychain_data_; |
- mutable unsigned int next_item_key_; |
+ mutable std::map<uintptr_t, SecKeychainAttributeList> keychain_attr_list_; |
+ mutable std::map<uintptr_t, KeychainPasswordData> keychain_data_; |
+ mutable uintptr_t next_item_key_; |
// Tracks the items that should be returned in subsequent calls to |
// SearchCopyNext, based on the last call to SearchCreateFromAttributes. |
// We can't handle multiple active searches, since we don't track the search |
// ref we return, but we don't need to for our mocking. |
- mutable std::vector<unsigned int> remaining_search_results_; |
+ mutable std::vector<uintptr_t> remaining_search_results_; |
// Track copies and releases to make sure they balance. Really these should |
// be maps to track per item, but this should be good enough to catch |