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

Unified Diff: net/http/http_cache_transaction.cc

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/disk_cache_based_quic_server_info.cc ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 0b0700c123f21dcdad7540f8746383ed86c7072d..896db76e1586ab01e41e74120ba83da8b6017633 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -215,23 +215,6 @@ void RecordOfflineStatus(int load_flags, RequestOfflineStatus status) {
}
}
-// TODO(rvargas): Remove once we get the data.
-void RecordVaryHeaderHistogram(const net::HttpResponseInfo* response) {
- enum VaryType {
- VARY_NOT_PRESENT,
- VARY_UA,
- VARY_OTHER,
- VARY_MAX
- };
- VaryType vary = VARY_NOT_PRESENT;
- if (response->vary_data.is_valid()) {
- vary = VARY_OTHER;
- if (response->headers->HasHeaderValue("vary", "user-agent"))
- vary = VARY_UA;
- }
- UMA_HISTOGRAM_ENUMERATION("HttpCache.Vary", vary, VARY_MAX);
-}
-
void RecordNoStoreHeaderHistogram(int load_flags,
const net::HttpResponseInfo* response) {
if (load_flags & net::LOAD_MAIN_FRAME) {
@@ -1227,7 +1210,6 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
cache_->DoomMainEntryForUrl(request_->url);
}
- RecordVaryHeaderHistogram(new_response);
RecordNoStoreHeaderHistogram(request_->load_flags, new_response);
if (new_response_->headers->response_code() == 416 &&
@@ -1361,10 +1343,7 @@ int HttpCache::Transaction::DoCreateEntryComplete(int result) {
return OK;
}
- if (result == OK) {
- UMA_HISTOGRAM_BOOLEAN("HttpCache.OpenToCreateRace", false);
- } else {
- UMA_HISTOGRAM_BOOLEAN("HttpCache.OpenToCreateRace", true);
+ if (result != OK) {
// We have a race here: Maybe we failed to open the entry and decided to
// create one, but by the time we called create, another transaction already
// created the entry. If we want to eliminate this issue, we need an atomic
« no previous file with comments | « net/http/disk_cache_based_quic_server_info.cc ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698