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

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

Issue 2623553003: precache: Add geometric resource weight function. (Closed)
Patch Set: Add default case, needed by some compilers. 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 | « no previous file | components/precache/core/precache_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/core/precache_fetcher.h
diff --git a/components/precache/core/precache_fetcher.h b/components/precache/core/precache_fetcher.h
index 87d1c4aa2370d3d11f14df24ce5e79bf532ac0f6..9868d1c015a84d0f26922e4971f162cb5dd8f389 100644
--- a/components/precache/core/precache_fetcher.h
+++ b/components/precache/core/precache_fetcher.h
@@ -20,6 +20,7 @@
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "components/precache/core/fetcher_pool.h"
+#include "components/precache/core/proto/precache.pb.h"
#include "components/precache/core/proto/quota.pb.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -270,6 +271,12 @@ class PrecacheFetcher : public base::SupportsWeakPtr<PrecacheFetcher> {
DISALLOW_COPY_AND_ASSIGN(PrecacheFetcher);
};
+// Visible for testing.
+double ResourceWeight(
+ PrecacheConfigurationSettings::ResourceWeightFunction function,
+ double resource_weight_ratio,
+ int64_t host_visits);
+
// Class that fetches a URL, and runs the specified callback when the fetch is
// complete. This class exists so that a different method can be run in
// response to different kinds of fetches, e.g. OnConfigFetchComplete when
« no previous file with comments | « no previous file | components/precache/core/precache_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698