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

Unified Diff: chrome/browser/precache/precache_util.cc

Issue 2146023003: Add UMA Precache.Freshness.Prefetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing includes Created 4 years, 5 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 | « no previous file | components/precache/content/precache_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/precache/precache_util.cc
diff --git a/chrome/browser/precache/precache_util.cc b/chrome/browser/precache/precache_util.cc
index 80ec4a1e9756d8814a4ba4d9ed45304b4940e112..c53a7788d352bfec11d851c94482becfc29562e1 100644
--- a/chrome/browser/precache/precache_util.cc
+++ b/chrome/browser/precache/precache_util.cc
@@ -15,14 +15,18 @@
#include "net/url_request/url_request.h"
#include "url/gurl.h"
+namespace net {
+class HttpResponseInfo;
+}
+
namespace {
void UpdatePrecacheMetricsAndStateOnUIThread(const GURL& url,
const GURL& referrer,
base::TimeDelta latency,
const base::Time& fetch_time,
+ const net::HttpResponseInfo& info,
int64_t size,
- bool was_cached,
bool is_user_traffic,
void* profile_id) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -38,7 +42,7 @@ void UpdatePrecacheMetricsAndStateOnUIThread(const GURL& url,
return;
precache_manager->UpdatePrecacheMetricsAndState(
- url, referrer, latency, fetch_time, size, was_cached, is_user_traffic);
+ url, referrer, latency, fetch_time, info, size, is_user_traffic);
}
} // namespace
@@ -63,7 +67,7 @@ void UpdatePrecacheMetricsAndState(const net::URLRequest* request,
base::Bind(
&UpdatePrecacheMetricsAndStateOnUIThread, request->url(),
GURL(request->referrer()), latency, base::Time::Now(),
- received_content_length, request->was_cached(),
+ request->response_info(), received_content_length,
data_use_measurement::DataUseMeasurement::IsUserInitiatedRequest(
request),
profile_id));
« no previous file with comments | « no previous file | components/precache/content/precache_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698