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 "net/base/network_delegate_impl.h" | 19 #include "net/base/network_delegate_impl.h" |
20 | 20 |
21 #if !defined(OS_IOS) | 21 #if !defined(OS_IOS) |
22 #include "components/data_use_measurement/content/data_use_measurement.h" | 22 #include "components/data_use_measurement/content/data_use_measurement.h" |
23 #endif | 23 #endif |
24 | 24 |
25 class ChromeExtensionsNetworkDelegate; | 25 class ChromeExtensionsNetworkDelegate; |
| 26 class ExpectCTMonitor; |
26 class PrefService; | 27 class PrefService; |
27 | 28 |
28 template<class T> class PrefMember; | 29 template<class T> class PrefMember; |
29 | 30 |
30 typedef PrefMember<bool> BooleanPrefMember; | 31 typedef PrefMember<bool> BooleanPrefMember; |
31 | 32 |
32 namespace base { | 33 namespace base { |
33 class Value; | 34 class Value; |
34 } | 35 } |
35 | 36 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 122 |
122 void set_domain_reliability_monitor( | 123 void set_domain_reliability_monitor( |
123 domain_reliability::DomainReliabilityMonitor* monitor) { | 124 domain_reliability::DomainReliabilityMonitor* monitor) { |
124 domain_reliability_monitor_ = monitor; | 125 domain_reliability_monitor_ = monitor; |
125 } | 126 } |
126 | 127 |
127 void set_data_use_aggregator( | 128 void set_data_use_aggregator( |
128 data_usage::DataUseAggregator* data_use_aggregator, | 129 data_usage::DataUseAggregator* data_use_aggregator, |
129 bool is_data_usage_off_the_record); | 130 bool is_data_usage_off_the_record); |
130 | 131 |
| 132 void set_expect_ct_monitor(ExpectCTMonitor* expect_ct_monitor); |
| 133 |
131 // Binds the pref members to |pref_service| and moves them to the IO thread. | 134 // Binds the pref members to |pref_service| and moves them to the IO thread. |
132 // |enable_referrers| cannot be NULL, the others can. | 135 // |enable_referrers| cannot be NULL, the others can. |
133 // This method should be called on the UI thread. | 136 // This method should be called on the UI thread. |
134 static void InitializePrefsOnUIThread( | 137 static void InitializePrefsOnUIThread( |
135 BooleanPrefMember* enable_referrers, | 138 BooleanPrefMember* enable_referrers, |
136 BooleanPrefMember* enable_do_not_track, | 139 BooleanPrefMember* enable_do_not_track, |
137 BooleanPrefMember* force_google_safe_search, | 140 BooleanPrefMember* force_google_safe_search, |
138 BooleanPrefMember* force_youtube_safety_mode, | 141 BooleanPrefMember* force_youtube_safety_mode, |
139 PrefService* pref_service); | 142 PrefService* pref_service); |
140 | 143 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 data_use_measurement::DataUseMeasurement data_use_measurement_; | 227 data_use_measurement::DataUseMeasurement data_use_measurement_; |
225 #endif | 228 #endif |
226 | 229 |
227 bool experimental_web_platform_features_enabled_; | 230 bool experimental_web_platform_features_enabled_; |
228 | 231 |
229 // Aggregates and reports network usage. | 232 // Aggregates and reports network usage. |
230 data_usage::DataUseAggregator* data_use_aggregator_; | 233 data_usage::DataUseAggregator* data_use_aggregator_; |
231 // Controls whether network usage is reported as being off the record. | 234 // Controls whether network usage is reported as being off the record. |
232 bool is_data_usage_off_the_record_; | 235 bool is_data_usage_off_the_record_; |
233 | 236 |
| 237 // The network delegate notifies |expect_ct_monitor_| when a |
| 238 // certificate fails to comply with Certificate Transparency policy. |
| 239 ExpectCTMonitor* expect_ct_monitor_; |
| 240 |
234 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 241 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
235 }; | 242 }; |
236 | 243 |
237 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 244 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |