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

Side by Side Diff: crypto/mock_apple_keychain.cc

Issue 2932473004: Remove depprecated methods in AppleKeychain. (Closed)
Patch Set: Clean up everything Created 3 years, 6 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/mock_apple_keychain.h ('k') | crypto/mock_apple_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')
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 #include "crypto/mock_apple_keychain.h" 5 #include "crypto/mock_apple_keychain.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const char* accountName, 65 const char* accountName,
66 UInt32 passwordLength, 66 UInt32 passwordLength,
67 const void* passwordData, 67 const void* passwordData,
68 SecKeychainItemRef* itemRef) const { 68 SecKeychainItemRef* itemRef) const {
69 IncrementKeychainAccessHistogram(); 69 IncrementKeychainAccessHistogram();
70 70
71 called_add_generic_ = true; 71 called_add_generic_ = true;
72 72
73 DCHECK_GT(passwordLength, 0U); 73 DCHECK_GT(passwordLength, 0U);
74 DCHECK(passwordData); 74 DCHECK(passwordData);
75 add_generic_password_ =
76 std::string(const_cast<char*>(static_cast<const char*>(passwordData)),
77 passwordLength);
78 return noErr; 75 return noErr;
79 } 76 }
80 77
81 std::string MockAppleKeychain::GetEncryptionPassword() const { 78 std::string MockAppleKeychain::GetEncryptionPassword() const {
82 IncrementKeychainAccessHistogram(); 79 IncrementKeychainAccessHistogram();
83 return "mock_password"; 80 return "mock_password";
84 } 81 }
85 82
86 } // namespace crypto 83 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/mock_apple_keychain.h ('k') | crypto/mock_apple_keychain_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698