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

Side by Side Diff: components/precache/core/precache_fetcher.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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ 5 #ifndef COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_
6 #define COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ 6 #define COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Visible for testing. 42 // Visible for testing.
43 extern const int kNoTracking; 43 extern const int kNoTracking;
44 extern const int kMaxParallelFetches; 44 extern const int kMaxParallelFetches;
45 45
46 // Information about the manifest for a host. 46 // Information about the manifest for a host.
47 struct ManifestHostInfo { 47 struct ManifestHostInfo {
48 ManifestHostInfo(int64_t manifest_id, 48 ManifestHostInfo(int64_t manifest_id,
49 const std::string& hostname, 49 const std::string& hostname,
50 int64_t visits, 50 int64_t visits,
51 const std::string& used_url_hash, 51 const std::string& used_url_hash,
52 const std::string& unused_url_hash); 52 const std::string& downloaded_url_hash);
53 ~ManifestHostInfo(); 53 ~ManifestHostInfo();
54 ManifestHostInfo(ManifestHostInfo&&); 54 ManifestHostInfo(ManifestHostInfo&&);
55 ManifestHostInfo& operator=(ManifestHostInfo&&); 55 ManifestHostInfo& operator=(ManifestHostInfo&&);
56 // Copy constructor and assignment operator are implicitly deleted. 56 // Copy constructor and assignment operator are implicitly deleted.
57 57
58 int64_t manifest_id; 58 int64_t manifest_id;
59 std::string hostname; 59 std::string hostname;
60 GURL manifest_url; 60 GURL manifest_url;
61 int64_t visits; 61 int64_t visits;
62 std::string used_url_hash; 62 std::string used_url_hash;
63 std::string unused_url_hash; 63 std::string downloaded_url_hash;
64 }; 64 };
65 65
66 // Information about a resource to be downloaded. 66 // Information about a resource to be downloaded.
67 struct ResourceInfo { 67 struct ResourceInfo {
68 ResourceInfo(const GURL& url, const std::string& referrer, double weight); 68 ResourceInfo(const GURL& url, const std::string& referrer, double weight);
69 ~ResourceInfo(); 69 ~ResourceInfo();
70 ResourceInfo(ResourceInfo&&); 70 ResourceInfo(ResourceInfo&&);
71 ResourceInfo& operator=(ResourceInfo&&); 71 ResourceInfo& operator=(ResourceInfo&&);
72 // Copy constructor and assignment operator are implicitly deleted. 72 // Copy constructor and assignment operator are implicitly deleted.
73 73
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 int64_t response_bytes_; 336 int64_t response_bytes_;
337 int64_t network_response_bytes_; 337 int64_t network_response_bytes_;
338 bool was_cached_; 338 bool was_cached_;
339 339
340 DISALLOW_COPY_AND_ASSIGN(Fetcher); 340 DISALLOW_COPY_AND_ASSIGN(Fetcher);
341 }; 341 };
342 342
343 } // namespace precache 343 } // namespace precache
344 344
345 #endif // COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ 345 #endif // COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_
OLDNEW
« no previous file with comments | « components/precache/core/precache_database_unittest.cc ('k') | components/precache/core/precache_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698