Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: chrome/browser/net/predictor.h

Issue 848303005: Renamed the dns_prefetch component to network_predictor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // A Predictor object is instantiated once in the browser process, and manages 5 // A Predictor object is instantiated once in the browser process, and manages
6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected 6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected
7 // subresources. 7 // subresources.
8 // Most hostname lists are provided by the renderer processes, and include URLs 8 // Most hostname lists are provided by the renderer processes, and include URLs
9 // that *might* be used in the near future by the browsing user. One goal of 9 // that *might* be used in the near future by the browsing user. One goal of
10 // this class is to cause the underlying DNS structure to lookup a hostname 10 // this class is to cause the underlying DNS structure to lookup a hostname
(...skipping 14 matching lines...) Expand all
25 #include <string> 25 #include <string>
26 #include <vector> 26 #include <vector>
27 27
28 #include "base/gtest_prod_util.h" 28 #include "base/gtest_prod_util.h"
29 #include "base/memory/scoped_ptr.h" 29 #include "base/memory/scoped_ptr.h"
30 #include "base/memory/weak_ptr.h" 30 #include "base/memory/weak_ptr.h"
31 #include "chrome/browser/net/prediction_options.h" 31 #include "chrome/browser/net/prediction_options.h"
32 #include "chrome/browser/net/referrer.h" 32 #include "chrome/browser/net/referrer.h"
33 #include "chrome/browser/net/timed_cache.h" 33 #include "chrome/browser/net/timed_cache.h"
34 #include "chrome/browser/net/url_info.h" 34 #include "chrome/browser/net/url_info.h"
35 #include "components/dns_prefetch/common/prefetch_common.h" 35 #include "components/network_hints/common/network_hints_common.h"
36 #include "net/base/host_port_pair.h" 36 #include "net/base/host_port_pair.h"
37 37
38 class IOThread; 38 class IOThread;
39 class PrefService; 39 class PrefService;
40 class Profile; 40 class Profile;
41 class ProfileIOData; 41 class ProfileIOData;
42 42
43 namespace base { 43 namespace base {
44 class ListValue; 44 class ListValue;
45 class WaitableEvent; 45 class WaitableEvent;
46 } 46 }
47 47
48 namespace net { 48 namespace net {
49 class HostResolver; 49 class HostResolver;
50 class SSLConfigService; 50 class SSLConfigService;
51 class ProxyService; 51 class ProxyService;
52 class TransportSecurityState; 52 class TransportSecurityState;
53 class URLRequestContextGetter; 53 class URLRequestContextGetter;
54 } 54 }
55 55
56 namespace user_prefs { 56 namespace user_prefs {
57 class PrefRegistrySyncable; 57 class PrefRegistrySyncable;
58 } 58 }
59 59
60 namespace chrome_browser_net { 60 namespace chrome_browser_net {
61 61
62 typedef dns_prefetch::UrlList UrlList; 62 typedef network_hints::UrlList UrlList;
63 typedef dns_prefetch::NameList NameList; 63 typedef network_hints::NameList NameList;
64 typedef std::map<GURL, UrlInfo> Results; 64 typedef std::map<GURL, UrlInfo> Results;
65 65
66 // An observer for testing. 66 // An observer for testing.
67 class PredictorObserver { 67 class PredictorObserver {
68 public: 68 public:
69 virtual ~PredictorObserver() {} 69 virtual ~PredictorObserver() {}
70 70
71 virtual void OnPreconnectUrl(const GURL& original_url, 71 virtual void OnPreconnectUrl(const GURL& original_url,
72 const GURL& first_party_for_cookies, 72 const GURL& first_party_for_cookies,
73 UrlInfo::ResolutionMotivation motivation, 73 UrlInfo::ResolutionMotivation motivation,
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 private: 610 private:
611 // These member functions return True for unittests. 611 // These member functions return True for unittests.
612 bool CanPrefetchAndPrerender() const override; 612 bool CanPrefetchAndPrerender() const override;
613 bool CanPreresolveAndPreconnect() const override; 613 bool CanPreresolveAndPreconnect() const override;
614 }; 614 };
615 615
616 } // namespace chrome_browser_net 616 } // namespace chrome_browser_net
617 617
618 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ 618 #endif // CHROME_BROWSER_NET_PREDICTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698