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 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/net/client_hints.h" | |
14 #include "net/base/network_delegate.h" | 15 #include "net/base/network_delegate.h" |
15 | 16 |
16 class CookieSettings; | 17 class CookieSettings; |
17 class ExtensionInfoMap; | 18 class ExtensionInfoMap; |
18 class PrefService; | 19 class PrefService; |
19 template<class T> class PrefMember; | 20 template<class T> class PrefMember; |
20 | 21 |
21 typedef PrefMember<bool> BooleanPrefMember; | 22 typedef PrefMember<bool> BooleanPrefMember; |
22 | 23 |
23 namespace base { | 24 namespace base { |
(...skipping 19 matching lines...) Expand all Loading... | |
43 } | 44 } |
44 | 45 |
45 // ChromeNetworkDelegate is the central point from within the chrome code to | 46 // ChromeNetworkDelegate is the central point from within the chrome code to |
46 // add hooks into the network stack. | 47 // add hooks into the network stack. |
47 class ChromeNetworkDelegate : public net::NetworkDelegate { | 48 class ChromeNetworkDelegate : public net::NetworkDelegate { |
48 public: | 49 public: |
49 // |enable_referrers| (and all of the other optional PrefMembers) should be | 50 // |enable_referrers| (and all of the other optional PrefMembers) should be |
50 // initialized on the UI thread (see below) beforehand. This object's owner is | 51 // initialized on the UI thread (see below) beforehand. This object's owner is |
51 // responsible for cleaning them up at shutdown. | 52 // responsible for cleaning them up at shutdown. |
52 ChromeNetworkDelegate(extensions::EventRouterForwarder* event_router, | 53 ChromeNetworkDelegate(extensions::EventRouterForwarder* event_router, |
53 BooleanPrefMember* enable_referrers); | 54 BooleanPrefMember* enable_referrers, |
55 bool enable_client_hints); | |
Ryan Sleevi
2013/02/08 22:12:53
Is there a reason this needs to be part of the con
bengr
2013/02/26 01:57:20
Done.
| |
54 virtual ~ChromeNetworkDelegate(); | 56 virtual ~ChromeNetworkDelegate(); |
55 | 57 |
56 // Not inlined because we assign a scoped_refptr, which requires us to include | 58 // Not inlined because we assign a scoped_refptr, which requires us to include |
57 // the header file. | 59 // the header file. |
58 void set_extension_info_map(ExtensionInfoMap* extension_info_map); | 60 void set_extension_info_map(ExtensionInfoMap* extension_info_map); |
59 | 61 |
60 void set_url_blacklist_manager( | 62 void set_url_blacklist_manager( |
61 const policy::URLBlacklistManager* url_blacklist_manager) { | 63 const policy::URLBlacklistManager* url_blacklist_manager) { |
62 url_blacklist_manager_ = url_blacklist_manager; | 64 url_blacklist_manager_ = url_blacklist_manager; |
63 } | 65 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 // Pointer to IOThread global, should outlive ChromeNetworkDelegate. | 198 // Pointer to IOThread global, should outlive ChromeNetworkDelegate. |
197 chrome_browser_net::LoadTimeStats* load_time_stats_; | 199 chrome_browser_net::LoadTimeStats* load_time_stats_; |
198 | 200 |
199 // Total size of all content (excluding headers) that has been received | 201 // Total size of all content (excluding headers) that has been received |
200 // over the network. | 202 // over the network. |
201 int64 received_content_length_; | 203 int64 received_content_length_; |
202 | 204 |
203 // Total original size of all content before it was transferred. | 205 // Total original size of all content before it was transferred. |
204 int64 original_content_length_; | 206 int64 original_content_length_; |
205 | 207 |
208 scoped_refptr<ClientHints> client_hints_; | |
209 | |
206 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 210 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
207 }; | 211 }; |
208 | 212 |
209 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 213 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |