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

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

Issue 2321343002: Redirect handling in resource prefetch predictor (Closed)
Patch Set: Update some comments Created 4 years, 3 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
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 #include "chrome/browser/predictors/resource_prefetch_common.h" 5 #include "chrome/browser/predictors/resource_prefetch_common.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <tuple> 8 #include <tuple>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 render_frame_id == other.render_frame_id; 196 render_frame_id == other.render_frame_id;
197 } 197 }
198 198
199 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig() 199 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig()
200 : mode(0), 200 : mode(0),
201 max_navigation_lifetime_seconds(60), 201 max_navigation_lifetime_seconds(60),
202 max_urls_to_track(500), 202 max_urls_to_track(500),
203 max_hosts_to_track(200), 203 max_hosts_to_track(200),
204 min_url_visit_count(2), 204 min_url_visit_count(2),
205 max_resources_per_entry(50), 205 max_resources_per_entry(50),
206 max_redirects_per_entry(100),
206 max_consecutive_misses(3), 207 max_consecutive_misses(3),
207 min_resource_confidence_to_trigger_prefetch(0.7f), 208 min_resource_confidence_to_trigger_prefetch(0.7f),
208 min_resource_hits_to_trigger_prefetch(2), 209 min_resource_hits_to_trigger_prefetch(2),
209 max_prefetches_inflight_per_navigation(24), 210 max_prefetches_inflight_per_navigation(24),
210 max_prefetches_inflight_per_host_per_navigation(3) { 211 max_prefetches_inflight_per_host_per_navigation(3) {
211 } 212 }
212 213
213 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig( 214 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig(
214 const ResourcePrefetchPredictorConfig& other) = default; 215 const ResourcePrefetchPredictorConfig& other) = default;
215 216
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 270
270 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const { 271 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const {
271 return max_resources_per_entry == 100; 272 return max_resources_per_entry == 100;
272 } 273 }
273 274
274 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const { 275 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const {
275 return max_urls_to_track == 200 && max_hosts_to_track == 100; 276 return max_urls_to_track == 200 && max_hosts_to_track == 100;
276 } 277 }
277 278
278 } // namespace predictors 279 } // namespace predictors
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698