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