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

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

Issue 2586813004: Report downloaded resources at most once (Closed)
Patch Set: Improved tests Created 4 years 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/core/precache_database.cc » ('j') | 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 e610ac48c32c9935f2370443ff63f39c35aac9d2..1c4784ca01238aa99b52f753d22abb44f2d2e268 100644
--- a/components/precache/core/precache_database.h
+++ b/components/precache/core/precache_database.h
@@ -92,11 +92,11 @@ class PrecacheDatabase {
// Returns the referrer host entry for the |referrer_host|.
PrecacheReferrerHostEntry GetReferrerHost(const std::string& referrer_host);
- // Populates the list of used and unused resources for referrer host with id
- // |referrer_host_id|.
+ // Populates the list of used and downloaded resources for referrer host with
+ // id |referrer_host_id|. It will also clear the reported downloaded_urls.
void GetURLListForReferrerHost(int64_t referrer_host_id,
std::vector<GURL>* used_urls,
- std::vector<GURL>* unused_urls);
+ std::vector<GURL>* downloaded_urls);
// Updates the |manifest_id| and |fetch_time| for the referrer host
// |hostname|, and deletes the precached subresource URLs for this top host.
@@ -123,6 +123,7 @@ class PrecacheDatabase {
private:
friend class PrecacheDatabaseTest;
+ friend class PrecacheFetcherTest;
bool IsDatabaseAccessible() const;
@@ -146,7 +147,8 @@ class PrecacheDatabase {
void RecordURLPrefetchInternal(const GURL& url,
const std::string& referrer_host,
bool is_precached,
- const base::Time& fetch_time);
+ const base::Time& fetch_time,
+ bool is_download_reported);
void UpdatePrecacheReferrerHostInternal(const std::string& hostname,
int64_t manifest_id,
« no previous file with comments | « no previous file | components/precache/core/precache_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698