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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "components/data_use_measurement/content/data_use_measurement.h" | 19 #include "components/data_use_measurement/content/data_use_measurement.h" |
20 #include "components/metrics/data_use_tracker.h" | |
20 #include "net/base/network_delegate_impl.h" | 21 #include "net/base/network_delegate_impl.h" |
21 | 22 |
22 class ChromeExtensionsNetworkDelegate; | 23 class ChromeExtensionsNetworkDelegate; |
23 class PrefService; | 24 class PrefService; |
24 | 25 |
25 template<class T> class PrefMember; | 26 template<class T> class PrefMember; |
26 | 27 |
27 typedef PrefMember<bool> BooleanPrefMember; | 28 typedef PrefMember<bool> BooleanPrefMember; |
28 | 29 |
29 namespace base { | 30 namespace base { |
(...skipping 30 matching lines...) Expand all Loading... | |
60 class URLBlacklistManager; | 61 class URLBlacklistManager; |
61 } | 62 } |
62 | 63 |
63 // ChromeNetworkDelegate is the central point from within the chrome code to | 64 // ChromeNetworkDelegate is the central point from within the chrome code to |
64 // add hooks into the network stack. | 65 // add hooks into the network stack. |
65 class ChromeNetworkDelegate : public net::NetworkDelegateImpl { | 66 class ChromeNetworkDelegate : public net::NetworkDelegateImpl { |
66 public: | 67 public: |
67 // |enable_referrers| (and all of the other optional PrefMembers) should be | 68 // |enable_referrers| (and all of the other optional PrefMembers) should be |
68 // initialized on the UI thread (see below) beforehand. This object's owner is | 69 // initialized on the UI thread (see below) beforehand. This object's owner is |
69 // responsible for cleaning them up at shutdown. | 70 // responsible for cleaning them up at shutdown. |
70 ChromeNetworkDelegate(extensions::EventRouterForwarder* event_router, | 71 ChromeNetworkDelegate( |
71 BooleanPrefMember* enable_referrers); | 72 extensions::EventRouterForwarder* event_router, |
73 BooleanPrefMember* enable_referrers, | |
74 metrics::UpdateUsagePrefCallbackType metrics_data_use_forwarder); | |
Alexei Svitkine (slow)
2016/03/31 04:32:25
Pass by const ref. Do the same in other places you
gayane -on leave until 09-2017
2016/03/31 17:54:57
Done.
| |
72 ~ChromeNetworkDelegate() override; | 75 ~ChromeNetworkDelegate() override; |
73 | 76 |
74 // Pass through to ChromeExtensionsNetworkDelegate::set_extension_info_map(). | 77 // Pass through to ChromeExtensionsNetworkDelegate::set_extension_info_map(). |
75 void set_extension_info_map(extensions::InfoMap* extension_info_map); | 78 void set_extension_info_map(extensions::InfoMap* extension_info_map); |
76 | 79 |
77 void set_url_blacklist_manager( | 80 void set_url_blacklist_manager( |
78 const policy::URLBlacklistManager* url_blacklist_manager) { | 81 const policy::URLBlacklistManager* url_blacklist_manager) { |
79 url_blacklist_manager_ = url_blacklist_manager; | 82 url_blacklist_manager_ = url_blacklist_manager; |
80 } | 83 } |
81 | 84 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 | 222 |
220 // Aggregates and reports network usage. | 223 // Aggregates and reports network usage. |
221 data_usage::DataUseAggregator* data_use_aggregator_; | 224 data_usage::DataUseAggregator* data_use_aggregator_; |
222 // Controls whether network usage is reported as being off the record. | 225 // Controls whether network usage is reported as being off the record. |
223 bool is_data_usage_off_the_record_; | 226 bool is_data_usage_off_the_record_; |
224 | 227 |
225 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 228 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
226 }; | 229 }; |
227 | 230 |
228 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 231 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |