OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CryptoHistograms_h | 5 #ifndef CryptoHistograms_h |
6 #define CryptoHistograms_h | 6 #define CryptoHistograms_h |
7 | 7 |
8 #include "public/platform/WebCrypto.h" | 8 #include "public/platform/WebCrypto.h" |
9 | 9 |
10 // ------------------------------------------------------------- | 10 // ------------------------------------------------------------- |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // ==> Increment CryptoAlgorithmRsaPss | 81 // ==> Increment CryptoAlgorithmRsaPss |
82 // ==> Increment CryptoAlgorithmSha512 | 82 // ==> Increment CryptoAlgorithmSha512 |
83 // | 83 // |
84 // (Note that even though the key is just being exported, all of its | 84 // (Note that even though the key is just being exported, all of its |
85 // algorithm parameters are also recorded) | 85 // algorithm parameters are also recorded) |
86 // | 86 // |
87 // ----------------------- | 87 // ----------------------- |
88 // Caveats | 88 // Caveats |
89 // ----------------------- | 89 // ----------------------- |
90 // | 90 // |
91 // * Usage counters are incomplete for shared workers and service workers | |
92 // (http://crbug.com/376039) | |
93 // | |
94 // * Measurements when there are errors (the Promise is rejected) are | 91 // * Measurements when there are errors (the Promise is rejected) are |
95 // inconsistent. | 92 // inconsistent. |
96 // | 93 // |
97 // In some cases the underlying UseCounter is incremented, in | 94 // In some cases the underlying UseCounter is incremented, in |
98 // others it isn't. It depends how early the error occured. For instance if | 95 // others it isn't. It depends how early the error occured. For instance if |
99 // an error was thrown by the binding layer, then no usage will be recorded | 96 // an error was thrown by the binding layer, then no usage will be recorded |
100 // for the algorithm/key in question. | 97 // for the algorithm/key in question. |
101 // | 98 // |
102 // Most of these early errors correspond with caller errors of WebCrypto so | 99 // Most of these early errors correspond with caller errors of WebCrypto so |
103 // they shouldn't skew the stats. | 100 // they shouldn't skew the stats. |
(...skipping 14 matching lines...) Expand all Loading... |
118 | 115 |
119 // This is a convenience function for calling histogramAlgorithm() and | 116 // This is a convenience function for calling histogramAlgorithm() and |
120 // histogramKey(). | 117 // histogramKey(). |
121 void HistogramAlgorithmAndKey(ExecutionContext*, | 118 void HistogramAlgorithmAndKey(ExecutionContext*, |
122 const WebCryptoAlgorithm&, | 119 const WebCryptoAlgorithm&, |
123 const WebCryptoKey&); | 120 const WebCryptoKey&); |
124 | 121 |
125 } // namespace blink | 122 } // namespace blink |
126 | 123 |
127 #endif | 124 #endif |
OLD | NEW |