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

Unified Diff: net/http/infinite_cache.cc

Issue 11267028: Http cache: Measure back navigations on the infinite cache simulation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/infinite_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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::OnBackForwardNavigation() {
+ if (!cache_)
+ return;
+ UMA_HISTOGRAM_BOOLEAN("InfiniteCache.BackForwardNavigation", 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);
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.DoomMethodHit", false);
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);
« no previous file with comments | « net/http/infinite_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698