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> |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 const base::FilePath& path) const override; | 182 const base::FilePath& path) const override; |
183 bool OnCanEnablePrivacyMode( | 183 bool OnCanEnablePrivacyMode( |
184 const GURL& url, | 184 const GURL& url, |
185 const GURL& first_party_for_cookies) const override; | 185 const GURL& first_party_for_cookies) const override; |
186 bool OnAreExperimentalCookieFeaturesEnabled() const override; | 186 bool OnAreExperimentalCookieFeaturesEnabled() const override; |
187 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( | 187 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
188 const net::URLRequest& request, | 188 const net::URLRequest& request, |
189 const GURL& target_url, | 189 const GURL& target_url, |
190 const GURL& referrer_url) const override; | 190 const GURL& referrer_url) const override; |
191 | 191 |
| 192 // Convenience function for reporting network usage to the |
| 193 // |data_use_aggregator_|. |
| 194 void ReportDataUsageStats(const net::URLRequest& request, |
| 195 int64_t tx_bytes, |
| 196 int64_t rx_bytes); |
| 197 |
192 scoped_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_; | 198 scoped_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_; |
193 | 199 |
194 void* profile_; | 200 void* profile_; |
195 base::FilePath profile_path_; | 201 base::FilePath profile_path_; |
196 scoped_refptr<content_settings::CookieSettings> cookie_settings_; | 202 scoped_refptr<content_settings::CookieSettings> cookie_settings_; |
197 | 203 |
198 scoped_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_; | 204 scoped_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_; |
199 | 205 |
200 // Weak, owned by our owner. | 206 // Weak, owned by our owner. |
201 BooleanPrefMember* enable_referrers_; | 207 BooleanPrefMember* enable_referrers_; |
(...skipping 19 matching lines...) Expand all Loading... |
221 | 227 |
222 // Aggregates and reports network usage. | 228 // Aggregates and reports network usage. |
223 data_usage::DataUseAggregator* data_use_aggregator_; | 229 data_usage::DataUseAggregator* data_use_aggregator_; |
224 // Controls whether network usage is reported as being off the record. | 230 // Controls whether network usage is reported as being off the record. |
225 bool is_data_usage_off_the_record_; | 231 bool is_data_usage_off_the_record_; |
226 | 232 |
227 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 233 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
228 }; | 234 }; |
229 | 235 |
230 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 236 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |