OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net/predictor.h" | 5 #include "chrome/browser/net/predictor.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <set> | 9 #include <set> |
10 #include <sstream> | 10 #include <sstream> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/containers/mru_cache.h" | 14 #include "base/containers/mru_cache.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
19 #include "base/prefs/pref_service.h" | |
20 #include "base/prefs/scoped_user_pref_update.h" | |
21 #include "base/profiler/scoped_tracker.h" | 19 #include "base/profiler/scoped_tracker.h" |
22 #include "base/single_thread_task_runner.h" | 20 #include "base/single_thread_task_runner.h" |
23 #include "base/stl_util.h" | 21 #include "base/stl_util.h" |
24 #include "base/strings/string_split.h" | 22 #include "base/strings/string_split.h" |
25 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
26 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
27 #include "base/synchronization/waitable_event.h" | 25 #include "base/synchronization/waitable_event.h" |
28 #include "base/thread_task_runner_handle.h" | 26 #include "base/thread_task_runner_handle.h" |
29 #include "base/threading/thread_restrictions.h" | 27 #include "base/threading/thread_restrictions.h" |
30 #include "base/time/time.h" | 28 #include "base/time/time.h" |
31 #include "base/values.h" | 29 #include "base/values.h" |
32 #include "chrome/browser/io_thread.h" | 30 #include "chrome/browser/io_thread.h" |
33 #include "chrome/browser/net/preconnect.h" | 31 #include "chrome/browser/net/preconnect.h" |
34 #include "chrome/browser/prefs/session_startup_pref.h" | 32 #include "chrome/browser/prefs/session_startup_pref.h" |
35 #include "chrome/browser/profiles/profile_io_data.h" | 33 #include "chrome/browser/profiles/profile_io_data.h" |
36 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
37 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
38 #include "components/pref_registry/pref_registry_syncable.h" | 36 #include "components/pref_registry/pref_registry_syncable.h" |
| 37 #include "components/prefs/pref_service.h" |
| 38 #include "components/prefs/scoped_user_pref_update.h" |
39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
40 #include "net/base/address_list.h" | 40 #include "net/base/address_list.h" |
41 #include "net/base/completion_callback.h" | 41 #include "net/base/completion_callback.h" |
42 #include "net/base/host_port_pair.h" | 42 #include "net/base/host_port_pair.h" |
43 #include "net/base/load_flags.h" | 43 #include "net/base/load_flags.h" |
44 #include "net/base/net_errors.h" | 44 #include "net/base/net_errors.h" |
45 #include "net/dns/host_resolver.h" | 45 #include "net/dns/host_resolver.h" |
46 #include "net/dns/single_request_host_resolver.h" | 46 #include "net/dns/single_request_host_resolver.h" |
47 #include "net/http/transport_security_state.h" | 47 #include "net/http/transport_security_state.h" |
48 #include "net/log/net_log.h" | 48 #include "net/log/net_log.h" |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 } | 1305 } |
1306 | 1306 |
1307 void SimplePredictor::ShutdownOnUIThread() { | 1307 void SimplePredictor::ShutdownOnUIThread() { |
1308 SetShutdown(true); | 1308 SetShutdown(true); |
1309 } | 1309 } |
1310 | 1310 |
1311 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; } | 1311 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; } |
1312 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; } | 1312 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; } |
1313 | 1313 |
1314 } // namespace chrome_browser_net | 1314 } // namespace chrome_browser_net |
OLD | NEW |