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 #include "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/macros.h" |
6 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
7 #include "base/time/time.h" | 8 #include "base/time/time.h" |
8 #include "crypto/mock_apple_keychain.h" | 9 #include "crypto/mock_apple_keychain.h" |
9 | 10 |
10 namespace { | 11 namespace { |
11 | 12 |
12 // Adds an entry to a local histogram to indicate that the Apple Keychain would | 13 // Adds an entry to a local histogram to indicate that the Apple Keychain would |
13 // have been accessed, if this class were not a mock of the Apple Keychain. | 14 // have been accessed, if this class were not a mock of the Apple Keychain. |
14 void IncrementKeychainAccessHistogram() { | 15 void IncrementKeychainAccessHistogram() { |
15 // This local histogram is accessed by Telemetry to track the number of times | 16 // This local histogram is accessed by Telemetry to track the number of times |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 passwordLength); | 76 passwordLength); |
76 return noErr; | 77 return noErr; |
77 } | 78 } |
78 | 79 |
79 std::string MockAppleKeychain::GetEncryptionPassword() const { | 80 std::string MockAppleKeychain::GetEncryptionPassword() const { |
80 IncrementKeychainAccessHistogram(); | 81 IncrementKeychainAccessHistogram(); |
81 return "mock_password"; | 82 return "mock_password"; |
82 } | 83 } |
83 | 84 |
84 } // namespace crypto | 85 } // namespace crypto |
OLD | NEW |