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

Unified Diff: components/precache/core/precache_fetcher.cc

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 | « components/precache/core/precache_fetcher.h ('k') | components/precache/core/precache_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/core/precache_fetcher.cc
diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc
index 18766b3f9403297da8639a74a8feece2705acd97..1a372c8dd152cf6d6d3b0c00a6f017e468c928a0 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -195,13 +195,13 @@ std::deque<ManifestHostInfo> RetrieveManifestInfo(
for (const auto& host : hosts_to_fetch) {
auto referrer_host_info = precache_database->GetReferrerHost(host.first);
if (referrer_host_info.id != PrecacheReferrerHostEntry::kInvalidId) {
- std::vector<GURL> used_urls, unused_urls;
- precache_database->GetURLListForReferrerHost(referrer_host_info.id,
- &used_urls, &unused_urls);
+ std::vector<GURL> used_urls, downloaded_urls;
+ precache_database->GetURLListForReferrerHost(
+ referrer_host_info.id, &used_urls, &downloaded_urls);
hosts_info.push_back(
ManifestHostInfo(referrer_host_info.manifest_id, host.first,
host.second, GetResourceURLBase64Hash(used_urls),
- GetResourceURLBase64Hash(unused_urls)));
+ GetResourceURLBase64Hash(downloaded_urls)));
} else {
hosts_info.push_back(
ManifestHostInfo(PrecacheReferrerHostEntry::kInvalidId, host.first,
@@ -641,7 +641,7 @@ void PrecacheFetcher::OnManifestInfoRetrieved(
manifest.manifest_url = net::AppendOrReplaceQueryParameter(
manifest.manifest_url, "used_resources", manifest.used_url_hash);
manifest.manifest_url = net::AppendOrReplaceQueryParameter(
- manifest.manifest_url, "unused_resources", manifest.unused_url_hash);
+ manifest.manifest_url, "d", manifest.downloaded_url_hash);
DCHECK(manifest.manifest_url.is_valid());
}
}
@@ -673,12 +673,12 @@ ManifestHostInfo::ManifestHostInfo(int64_t manifest_id,
const std::string& hostname,
int64_t visits,
const std::string& used_url_hash,
- const std::string& unused_url_hash)
+ const std::string& downloaded_url_hash)
: manifest_id(manifest_id),
hostname(hostname),
visits(visits),
used_url_hash(used_url_hash),
- unused_url_hash(unused_url_hash) {}
+ downloaded_url_hash(downloaded_url_hash) {}
ManifestHostInfo::~ManifestHostInfo() {}
« no previous file with comments | « components/precache/core/precache_fetcher.h ('k') | components/precache/core/precache_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698