Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file contains macros to simplify histogram reporting from the disk | 5 // This file contains macros to simplify histogram reporting from the disk |
| 6 // cache. The main issue is that we want to have separate histograms for each | 6 // cache. The main issue is that we want to have separate histograms for each |
| 7 // type of cache (regular vs. media, etc), without adding the complexity of | 7 // type of cache (regular vs. media, etc), without adding the complexity of |
| 8 // keeping track of a potentially large number of histogram objects that have to | 8 // keeping track of a potentially large number of histogram objects that have to |
| 9 // survive the backend object that created them. | 9 // survive the backend object that created them. |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 switch (BACKEND_OBJ->cache_type()) {\ | 105 switch (BACKEND_OBJ->cache_type()) {\ |
| 106 case net::DISK_CACHE:\ | 106 case net::DISK_CACHE:\ |
| 107 CACHE_HISTOGRAM_##type(my_name.data(), sample);\ | 107 CACHE_HISTOGRAM_##type(my_name.data(), sample);\ |
| 108 break;\ | 108 break;\ |
| 109 case net::MEDIA_CACHE:\ | 109 case net::MEDIA_CACHE:\ |
| 110 CACHE_HISTOGRAM_##type(my_name.data(), sample);\ | 110 CACHE_HISTOGRAM_##type(my_name.data(), sample);\ |
| 111 break;\ | 111 break;\ |
| 112 case net::APP_CACHE:\ | 112 case net::APP_CACHE:\ |
| 113 CACHE_HISTOGRAM_##type(my_name.data(), sample);\ | 113 CACHE_HISTOGRAM_##type(my_name.data(), sample);\ |
| 114 break;\ | 114 break;\ |
| 115 case net::SHADER_CACHE:\ | |
|
rvargas (doing something else)
2013/02/06 20:06:39
reminder: this implies adding a bunch of new histo
dsinclair
2013/02/07 18:03:07
Copied the DiskCache.3 entries and made them DiskC
| |
| 116 CACHE_HISTOGRAM_##type(my_name.data(), sample);\ | |
| 117 break;\ | |
| 115 default:\ | 118 default:\ |
| 116 NOTREACHED();\ | 119 NOTREACHED();\ |
| 117 break;\ | 120 break;\ |
| 118 }\ | 121 }\ |
| 119 } | 122 } |
| 120 | 123 |
| 121 #endif // NET_DISK_CACHE_HISTOGRAM_MACROS_H_ | 124 #endif // NET_DISK_CACHE_HISTOGRAM_MACROS_H_ |
| OLD | NEW |