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

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

Issue 2061303003: Precache should cancel when there is user traffic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restructured Created 4 years, 6 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
Index: chrome/browser/precache/precache_util.h
diff --git a/chrome/browser/precache/precache_util.h b/chrome/browser/precache/precache_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..6bcb623bd497e1ff48e2e13b6a4ad3bf0a439cc8
--- /dev/null
+++ b/chrome/browser/precache/precache_util.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PRECACHE_PRECACHE_UTIL_H_
+#define CHROME_BROWSER_PRECACHE_PRECACHE_UTIL_H_
+
+#include "base/time/time.h"
+#include "net/url_request/url_request.h"
+#include "url/gurl.h"
+
+namespace precache {
+
+class PrecacheUtil {
bengr 2016/06/20 20:21:14 Why are these in a class?
Raj 2016/06/30 06:03:08 Removed the class.
+ public:
+ static void UpdatePrecacheMetricsAndState(const net::URLRequest* request,
+ void* profile_id);
+
+ private:
+ static void UpdatePrecacheMetricsAndStateOnUIThread(
+ const GURL& url,
+ const GURL& referrer,
+ base::TimeDelta latency,
+ const base::Time& fetch_time,
+ int64_t size,
+ bool was_cached,
+ bool is_user_traffic,
+ void* profile_id);
+};
+
+} // namespace precache
+
+#endif // CHROME_BROWSER_PRECACHE_PRECACHE_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698