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 <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" |
11 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
12 #include "base/prefs/pref_service.h" | |
13 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
14 #include "chrome/browser/net/prediction_options.h" | 13 #include "chrome/browser/net/prediction_options.h" |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "components/prefs/pref_service.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "content/public/browser/render_frame_host.h" | 18 #include "content/public/browser/render_frame_host.h" |
19 #include "content/public/browser/render_process_host.h" | 19 #include "content/public/browser/render_process_host.h" |
20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
21 | 21 |
22 using base::FieldTrialList; | 22 using base::FieldTrialList; |
23 using std::string; | 23 using std::string; |
24 using std::vector; | 24 using std::vector; |
25 | 25 |
26 namespace predictors { | 26 namespace predictors { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const { | 260 bool ResourcePrefetchPredictorConfig::IsMoreResourcesEnabledForTest() const { |
261 return max_resources_per_entry == 100; | 261 return max_resources_per_entry == 100; |
262 } | 262 } |
263 | 263 |
264 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const { | 264 bool ResourcePrefetchPredictorConfig::IsSmallDBEnabledForTest() const { |
265 return max_urls_to_track == 200 && max_hosts_to_track == 100; | 265 return max_urls_to_track == 200 && max_hosts_to_track == 100; |
266 } | 266 } |
267 | 267 |
268 } // namespace predictors | 268 } // namespace predictors |
OLD | NEW |