| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "base/metrics/field_trial_params.h" | 10 #include "base/metrics/field_trial_params.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig() | 133 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig() |
| 134 : mode(0), | 134 : mode(0), |
| 135 max_navigation_lifetime_seconds(60), | 135 max_navigation_lifetime_seconds(60), |
| 136 max_urls_to_track(500), | 136 max_urls_to_track(500), |
| 137 max_hosts_to_track(200), | 137 max_hosts_to_track(200), |
| 138 min_url_visit_count(2), | 138 min_url_visit_count(2), |
| 139 max_resources_per_entry(50), | 139 max_resources_per_entry(50), |
| 140 max_origins_per_entry(50), | 140 max_origins_per_entry(50), |
| 141 max_consecutive_misses(3), | 141 max_consecutive_misses(3), |
| 142 max_redirect_consecutive_misses(5), |
| 142 min_resource_confidence_to_trigger_prefetch(0.7f), | 143 min_resource_confidence_to_trigger_prefetch(0.7f), |
| 143 min_resource_hits_to_trigger_prefetch(2), | 144 min_resource_hits_to_trigger_prefetch(2), |
| 144 max_prefetches_inflight_per_navigation(5), | 145 max_prefetches_inflight_per_navigation(5), |
| 145 max_prefetches_inflight_per_host_per_navigation(3), | 146 max_prefetches_inflight_per_host_per_navigation(3), |
| 146 is_url_learning_enabled(false), | 147 is_url_learning_enabled(false), |
| 147 is_manifests_enabled(false), | 148 is_manifests_enabled(false), |
| 148 is_origin_prediction_enabled(false) {} | 149 is_origin_prediction_enabled(false) {} |
| 149 | 150 |
| 150 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig( | 151 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig( |
| 151 const ResourcePrefetchPredictorConfig& other) = default; | 152 const ResourcePrefetchPredictorConfig& other) = default; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 193 |
| 193 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const { | 194 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const { |
| 194 return max_resources_per_entry == 100; | 195 return max_resources_per_entry == 100; |
| 195 } | 196 } |
| 196 | 197 |
| 197 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const { | 198 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const { |
| 198 return max_urls_to_track == 200 && max_hosts_to_track == 100; | 199 return max_urls_to_track == 200 && max_hosts_to_track == 100; |
| 199 } | 200 } |
| 200 | 201 |
| 201 } // namespace predictors | 202 } // namespace predictors |
| OLD | NEW |