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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig() | 127 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig() |
128 : mode(0), | 128 : mode(0), |
129 max_navigation_lifetime_seconds(60), | 129 max_navigation_lifetime_seconds(60), |
130 max_urls_to_track(500), | 130 max_urls_to_track(500), |
131 max_hosts_to_track(200), | 131 max_hosts_to_track(200), |
132 min_url_visit_count(2), | 132 min_url_visit_count(2), |
133 max_resources_per_entry(50), | 133 max_resources_per_entry(50), |
134 max_consecutive_misses(3), | 134 max_consecutive_misses(3), |
135 min_resource_confidence_to_trigger_prefetch(0.7f), | 135 min_resource_confidence_to_trigger_prefetch(0.7f), |
136 min_resource_hits_to_trigger_prefetch(2), | 136 min_resource_hits_to_trigger_prefetch(2), |
137 max_prefetches_inflight_per_navigation(24), | 137 max_prefetches_inflight_per_navigation(5), |
138 max_prefetches_inflight_per_host_per_navigation(3) { | 138 max_prefetches_inflight_per_host_per_navigation(3) { |
139 } | 139 } |
140 | 140 |
141 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig( | 141 ResourcePrefetchPredictorConfig::ResourcePrefetchPredictorConfig( |
142 const ResourcePrefetchPredictorConfig& other) = default; | 142 const ResourcePrefetchPredictorConfig& other) = default; |
143 | 143 |
144 ResourcePrefetchPredictorConfig::~ResourcePrefetchPredictorConfig() { | 144 ResourcePrefetchPredictorConfig::~ResourcePrefetchPredictorConfig() { |
145 } | 145 } |
146 | 146 |
147 bool ResourcePrefetchPredictorConfig::IsLearningEnabled() const { | 147 bool ResourcePrefetchPredictorConfig::IsLearningEnabled() const { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 183 |
184 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const { | 184 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const { |
185 return max_resources_per_entry == 100; | 185 return max_resources_per_entry == 100; |
186 } | 186 } |
187 | 187 |
188 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const { | 188 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const { |
189 return max_urls_to_track == 200 && max_hosts_to_track == 100; | 189 return max_urls_to_track == 200 && max_hosts_to_track == 100; |
190 } | 190 } |
191 | 191 |
192 } // namespace predictors | 192 } // namespace predictors |
OLD | NEW |