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

Side by Side Diff: crypto/mock_apple_keychain.cc

Issue 2293583002: Change includes of histogram.h to histogram_macros.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
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"
6
5 #include "base/logging.h" 7 #include "base/logging.h"
6 #include "base/macros.h" 8 #include "base/macros.h"
7 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram_macros.h"
8 #include "base/time/time.h" 10 #include "base/time/time.h"
9 #include "crypto/mock_apple_keychain.h"
10 11
11 namespace { 12 namespace {
12 13
13 // Adds an entry to a local histogram to indicate that the Apple Keychain would 14 // Adds an entry to a local histogram to indicate that the Apple Keychain would
14 // have been accessed, if this class were not a mock of the Apple Keychain. 15 // have been accessed, if this class were not a mock of the Apple Keychain.
15 void IncrementKeychainAccessHistogram() { 16 void IncrementKeychainAccessHistogram() {
16 // This local histogram is accessed by Telemetry to track the number of times 17 // This local histogram is accessed by Telemetry to track the number of times
17 // the keychain is accessed, since keychain access is known to be synchronous 18 // the keychain is accessed, since keychain access is known to be synchronous
18 // and slow. 19 // and slow.
19 LOCAL_HISTOGRAM_BOOLEAN("OSX.Keychain.Access", true); 20 LOCAL_HISTOGRAM_BOOLEAN("OSX.Keychain.Access", true);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 passwordLength); 77 passwordLength);
77 return noErr; 78 return noErr;
78 } 79 }
79 80
80 std::string MockAppleKeychain::GetEncryptionPassword() const { 81 std::string MockAppleKeychain::GetEncryptionPassword() const {
81 IncrementKeychainAccessHistogram(); 82 IncrementKeychainAccessHistogram();
82 return "mock_password"; 83 return "mock_password";
83 } 84 }
84 85
85 } // namespace crypto 86 } // namespace crypto
OLDNEW
« no previous file with comments | « content/child/web_database_observer_impl.cc ('k') | device/battery/battery_status_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698