Chromium Code Reviews| Index: net/http/infinite_cache.cc |
| =================================================================== |
| --- net/http/infinite_cache.cc (revision 163902) |
| +++ net/http/infinite_cache.cc (working copy) |
| @@ -275,6 +275,12 @@ |
| CryptoHash(cache_key, &resource_data_->key); |
| } |
| +void InfiniteCacheTransaction::OnBackNavigation() { |
| + if (!cache_) |
| + return; |
| + UMA_HISTOGRAM_BOOLEAN("InfiniteCache.BackNavigation", true); |
| +} |
| + |
| void InfiniteCacheTransaction::OnResponseReceived( |
| const HttpResponseInfo* response) { |
| if (!cache_) |
| @@ -522,10 +528,14 @@ |
| return; |
| UMA_HISTOGRAM_BOOLEAN("InfiniteCache.TotalRequests", true); |
| + if (data->details.flags & NO_STORE) |
| + UMA_HISTOGRAM_BOOLEAN("InfiniteCache.NoStore", true); |
| + |
| header_->num_requests++; |
| KeyMap::iterator i = map_.find(data->key); |
| if (i != map_.end()) { |
| if (data->details.flags & DOOM_METHOD) { |
| + UMA_HISTOGRAM_BOOLEAN("InfiniteCache.DoomMethodHit", true); |
|
gavinp
2012/10/25 18:25:47
Is this part of a separate CL that got mixed in he
rvargas (doing something else)
2012/10/25 18:32:18
part of this CL. The whole CL is about getting clo
gavinp
2012/10/25 18:56:26
Great. The CL probably needs the subject and descr
rvargas (doing something else)
2012/10/25 19:04:49
Feel free to modify it as you wish.
|
| Remove(i->second); |
| map_.erase(i); |
| return; |
| @@ -561,8 +571,10 @@ |
| if (data->details.flags & NO_STORE) |
| return; |
| - if (data->details.flags & DOOM_METHOD) |
| + if (data->details.flags & DOOM_METHOD) { |
| + UMA_HISTOGRAM_BOOLEAN("InfiniteCache.DoomMethodMiss", true); |
| return; |
| + } |
| map_[data->key] = data->details; |
| Add(data->details); |
| @@ -570,7 +582,7 @@ |
| void InfiniteCache::Worker::LoadData() { |
| if (path_.empty()) |
| - return InitializeData();; |
| + return InitializeData(); |
| PlatformFile file = base::CreatePlatformFile( |
| path_, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, NULL, NULL); |