Index: chrome/browser/predictors/resource_prefetch_common.h |
diff --git a/chrome/browser/predictors/resource_prefetch_common.h b/chrome/browser/predictors/resource_prefetch_common.h |
index 9f63d18fa978017f921ee9b353bcef9db8ff1173..141dc43c5c157a3cd9424ebcbb5aab763338f528 100644 |
--- a/chrome/browser/predictors/resource_prefetch_common.h |
+++ b/chrome/browser/predictors/resource_prefetch_common.h |
@@ -40,6 +40,42 @@ struct NavigationID { |
base::TimeTicks creation_time; |
}; |
+// Represents the config for the resource prefetch prediction algorithm. It is |
+// useful for running experiments. |
+struct ResourcePrefetchPredictorConfig { |
+ // Initializes the config with default values. |
+ ResourcePrefetchPredictorConfig(); |
+ |
+ // If a navigation hasn't seen a load complete event in this much time, it |
+ // is considered abandoned. |
+ int max_navigation_lifetime_seconds; // Default 60 |
dominich
2012/07/23 16:04:41
i don't think you should put the defaults here. An
Shishir
2012/08/01 22:35:24
Done.
|
+ // Size of LRU caches for the Url data. |
dominich
2012/07/23 16:04:41
nit: URL
Shishir
2012/08/01 22:35:24
Done.
|
+ size_t max_urls_to_track; // Default 500 |
+ // The number of times, we should have seen a visit to this Url in history |
dominich
2012/07/23 16:04:41
nit: URL
Shishir
2012/08/01 22:35:24
Done.
|
+ // to start tracking it. This is to ensure we dont bother with oneoff |
+ // entries. |
+ int min_url_visit_count; // Default 3 |
+ // The maximum number of resources to store per entry. |
+ int max_resources_per_entry; // Default 50 |
+ // The number of consecutive misses after we stop tracking a resource Url. |
dominich
2012/07/23 16:04:41
nit: URL
Shishir
2012/08/01 22:35:24
Done.
|
+ int max_consecutive_misses; // Default 3 |
+ |
+ // The number of resources we should report accuracy stats on. |
+ int num_resources_assumed_prefetched; // Default 25 |
+ |
+ // The minimum confidence (accuracy of hits) required for a resource to be |
+ // prefetched. |
+ float min_resource_confidence_to_trigger_prefetch; // Default 0.8 |
+ // The minimum number of times we must have a url on record to prefetch it. |
+ float min_resource_hits_to_trigger_prefetch; // Default 4 |
dominich
2012/07/23 16:04:41
why is this float?
Shishir
2012/08/01 22:35:24
Changed to int
|
+ |
+ // Maximum number of prefetches that can be inflight for a single navigation. |
+ size_t max_prefetches_inflight_per_navigation; // Default 24 |
+ // Maximum number of prefetches that can be inflight for a host for a single |
+ // navigation. |
+ int max_prefetches_inflight_per_host_per_navigation; // Default 3 |
dominich
2012/07/23 16:04:41
inconsistency: Both are max prefetches in-flight,
Shishir
2012/08/01 22:35:24
Its just the way they are used. One was used in co
|
+}; |
+ |
} // namespace predictors |
#endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_ |