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

Side by Side Diff: chrome/browser/predictors/resource_prefetch_common.h

Issue 2796783004: predictors: Add origin learning. (Closed)
Patch Set: , Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetch_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_
6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_ 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 size_t max_urls_to_track; 104 size_t max_urls_to_track;
105 size_t max_hosts_to_track; 105 size_t max_hosts_to_track;
106 106
107 // The number of times we should have seen a visit to this URL in history 107 // The number of times we should have seen a visit to this URL in history
108 // to start tracking it. This is to ensure we don't bother with oneoff 108 // to start tracking it. This is to ensure we don't bother with oneoff
109 // entries. For hosts we track each one. 109 // entries. For hosts we track each one.
110 size_t min_url_visit_count; 110 size_t min_url_visit_count;
111 111
112 // The maximum number of resources to store per entry. 112 // The maximum number of resources to store per entry.
113 size_t max_resources_per_entry; 113 size_t max_resources_per_entry;
114 // The maximum number of origins to store per entry.
115 size_t max_origins_per_entry;
114 // The number of consecutive misses after we stop tracking a resource URL. 116 // The number of consecutive misses after we stop tracking a resource URL.
115 size_t max_consecutive_misses; 117 size_t max_consecutive_misses;
116 118
117 // The minimum confidence (accuracy of hits) required for a resource to be 119 // The minimum confidence (accuracy of hits) required for a resource to be
118 // prefetched. 120 // prefetched.
119 float min_resource_confidence_to_trigger_prefetch; 121 float min_resource_confidence_to_trigger_prefetch;
120 // The minimum number of times we must have a URL on record to prefetch it. 122 // The minimum number of times we must have a URL on record to prefetch it.
121 size_t min_resource_hits_to_trigger_prefetch; 123 size_t min_resource_hits_to_trigger_prefetch;
122 124
123 // Maximum number of prefetches that can be inflight for a single navigation. 125 // Maximum number of prefetches that can be inflight for a single navigation.
124 size_t max_prefetches_inflight_per_navigation; 126 size_t max_prefetches_inflight_per_navigation;
125 // Maximum number of prefetches that can be inflight for a host for a single 127 // Maximum number of prefetches that can be inflight for a host for a single
126 // navigation. 128 // navigation.
127 size_t max_prefetches_inflight_per_host_per_navigation; 129 size_t max_prefetches_inflight_per_host_per_navigation;
128 // True iff the predictor could use a url-based database. 130 // True iff the predictor could use a url-based database.
129 bool is_url_learning_enabled; 131 bool is_url_learning_enabled;
130 // True iff the predictor could use manifests. 132 // True iff the predictor could use manifests.
131 bool is_manifests_enabled; 133 bool is_manifests_enabled;
134 // True iff the origin-based prediction is enabled.
135 bool is_origin_prediction_enabled;
132 }; 136 };
133 137
134 } // namespace predictors 138 } // namespace predictors
135 139
136 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_ 140 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetch_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698