| Index: content/browser/cache_storage/cache_storage_cache.cc
|
| diff --git a/content/browser/cache_storage/cache_storage_cache.cc b/content/browser/cache_storage/cache_storage_cache.cc
|
| index 9a4a02e6d224190a8c369e2aee3a28709ca1bc34..a120339b5d9c1bccf7d60979c248d805a032b29f 100644
|
| --- a/content/browser/cache_storage/cache_storage_cache.cc
|
| +++ b/content/browser/cache_storage/cache_storage_cache.cc
|
| @@ -38,6 +38,7 @@
|
| #include "storage/browser/blob/blob_storage_context.h"
|
| #include "storage/browser/blob/blob_url_request_job_factory.h"
|
| #include "storage/browser/quota/quota_manager_proxy.h"
|
| +#include "storage/common/storage_histograms.h"
|
| #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
|
|
|
| namespace content {
|
| @@ -47,6 +48,8 @@ namespace {
|
| const size_t kMaxQueryCacheResultBytes =
|
| 1024 * 1024 * 10; // 10MB query cache limit
|
|
|
| +const char kRecordBytesLabel[] = "DiskCache.CacheStorage";
|
| +
|
| // This class ensures that the cache and the entry have a lifetime as long as
|
| // the blob that is created to contain them.
|
| class CacheStorageCacheDataHandle
|
| @@ -185,6 +188,9 @@ void ReadMetadataDidReadMetadata(disk_cache::Entry* entry,
|
| return;
|
| }
|
|
|
| + if (rv > 0)
|
| + storage::RecordBytesRead(kRecordBytesLabel, rv);
|
| +
|
| std::unique_ptr<proto::CacheMetadata> metadata(new proto::CacheMetadata());
|
|
|
| if (!metadata->ParseFromArray(buffer->data(), buffer->size())) {
|
| @@ -1002,6 +1008,9 @@ void CacheStorageCache::WriteSideDataDidWrite(const ErrorCallback& callback,
|
| return;
|
| }
|
|
|
| + if (rv > 0)
|
| + storage::RecordBytesWritten(kRecordBytesLabel, rv);
|
| +
|
| UpdateCacheSize(base::Bind(callback, CACHE_STORAGE_OK));
|
| }
|
|
|
| @@ -1173,6 +1182,9 @@ void CacheStorageCache::PutDidWriteHeaders(
|
| return;
|
| }
|
|
|
| + if (rv > 0)
|
| + storage::RecordBytesWritten(kRecordBytesLabel, rv);
|
| +
|
| // The metadata is written, now for the response content. The data is streamed
|
| // from the blob into the cache entry.
|
|
|
|
|