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

Side by Side Diff: crypto/mock_apple_keychain.h

Issue 407713002: clean up code at crypto folder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert code around 84line at p224.cc Created 6 years, 5 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
« no previous file with comments | « crypto/ec_private_key_nss.cc ('k') | crypto/nss_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CRYPTO_MOCK_KEYCHAIN_MAC_H_ 5 #ifndef CRYPTO_MOCK_KEYCHAIN_MAC_H_
6 #define CRYPTO_MOCK_KEYCHAIN_MAC_H_ 6 #define CRYPTO_MOCK_KEYCHAIN_MAC_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 bool called_add_generic() const { return called_add_generic_; } 133 bool called_add_generic() const { return called_add_generic_; }
134 134
135 // Returns the value of the password set when |AddGenericPassword()| was 135 // Returns the value of the password set when |AddGenericPassword()| was
136 // called. 136 // called.
137 std::string add_generic_password() const { return add_generic_password_; } 137 std::string add_generic_password() const { return add_generic_password_; }
138 138
139 // Returns the number of allocations - deallocations for password data. 139 // Returns the number of allocations - deallocations for password data.
140 int password_data_count() const { return password_data_count_; } 140 int password_data_count() const { return password_data_count_; }
141 141
142 private: 142 private:
143
144 // Type used for the keys in the std::map(s) and MockAppleKeychain items. 143 // Type used for the keys in the std::map(s) and MockAppleKeychain items.
145 typedef uintptr_t MockKeychainItemType; 144 typedef uintptr_t MockKeychainItemType;
146 145
147 // Type of the map holding the mock keychain attributes. 146 // Type of the map holding the mock keychain attributes.
148 typedef std::map<MockKeychainItemType, SecKeychainAttributeList> 147 typedef std::map<MockKeychainItemType, SecKeychainAttributeList>
149 MockKeychainAttributesMap; 148 MockKeychainAttributesMap;
150 149
151 #if !defined(OS_IOS) 150 #if !defined(OS_IOS)
152 // Returns true if the keychain already contains a password that matches the 151 // Returns true if the keychain already contains a password that matches the
153 // attributes provided. 152 // attributes provided.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // and |ItemFreeContent|. 241 // and |ItemFreeContent|.
243 mutable int password_data_count_; 242 mutable int password_data_count_;
244 243
245 // Records the password being set when |AddGenericPassword()| gets called. 244 // Records the password being set when |AddGenericPassword()| gets called.
246 mutable std::string add_generic_password_; 245 mutable std::string add_generic_password_;
247 }; 246 };
248 247
249 } // namespace crypto 248 } // namespace crypto
250 249
251 #endif // CRYPTO_MOCK_KEYCHAIN_MAC_H_ 250 #endif // CRYPTO_MOCK_KEYCHAIN_MAC_H_
OLDNEW
« no previous file with comments | « crypto/ec_private_key_nss.cc ('k') | crypto/nss_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698