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

Unified Diff: components/precache/core/precache_database.h

Issue 2596093002: Create a synthetic field trial for precache. (Closed)
Patch Set: Rebase. Created 3 years, 11 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 | « components/precache/content/precache_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/core/precache_database.h
diff --git a/components/precache/core/precache_database.h b/components/precache/core/precache_database.h
index 1c4784ca01238aa99b52f753d22abb44f2d2e268..984a3754f2d87f15c1cfffbdf278bc5c6c96e661 100644
--- a/components/precache/core/precache_database.h
+++ b/components/precache/core/precache_database.h
@@ -67,11 +67,13 @@ class PrecacheDatabase {
base::Time GetLastPrecacheTimestamp();
// Report precache-related metrics in response to a URL being fetched, where
- // the fetch was motivated by precaching.
+ // the fetch was motivated by precaching. This is called from the network
+ // delegate, via precache_util.
void RecordURLPrefetchMetrics(const net::HttpResponseInfo& info,
const base::TimeDelta& latency);
- // Records the precache of an url |url| for top host |referrer_host|.
+ // Records the precache of an url |url| for top host |referrer_host|. This is
+ // called from PrecacheFetcher.
void RecordURLPrefetch(const GURL& url,
const std::string& referrer_host,
const base::Time& fetch_time,
@@ -81,6 +83,7 @@ class PrecacheDatabase {
// Report precache-related metrics in response to a URL being fetched, where
// the fetch was not motivated by precaching. |is_connection_cellular|
// indicates whether the current network connection is a cellular network.
+ // This is called from the network delegate, via precache_util.
void RecordURLNonPrefetch(const GURL& url,
const base::TimeDelta& latency,
const base::Time& fetch_time,
@@ -124,6 +127,7 @@ class PrecacheDatabase {
private:
friend class PrecacheDatabaseTest;
friend class PrecacheFetcherTest;
+ friend class PrecacheManagerTest;
bool IsDatabaseAccessible() const;
« no previous file with comments | « components/precache/content/precache_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698