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_IO_THREAD_H_ | 5 #ifndef CHROME_BROWSER_IO_THREAD_H_ |
6 #define CHROME_BROWSER_IO_THREAD_H_ | 6 #define CHROME_BROWSER_IO_THREAD_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 20 matching lines...) Expand all Loading... | |
31 class PrefRegistrySimple; | 31 class PrefRegistrySimple; |
32 class SystemURLRequestContextGetter; | 32 class SystemURLRequestContextGetter; |
33 | 33 |
34 namespace base { | 34 namespace base { |
35 class CommandLine; | 35 class CommandLine; |
36 } | 36 } |
37 | 37 |
38 #if defined(OS_ANDROID) | 38 #if defined(OS_ANDROID) |
39 namespace chrome { | 39 namespace chrome { |
40 namespace android { | 40 namespace android { |
41 class DataUseTabModel; | |
41 class ExternalDataUseObserver; | 42 class ExternalDataUseObserver; |
42 } | 43 } |
43 } | 44 } |
44 #endif // defined(OS_ANDROID) | 45 #endif // defined(OS_ANDROID) |
45 | 46 |
46 namespace chrome_browser_net { | 47 namespace chrome_browser_net { |
47 class DnsProbeService; | 48 class DnsProbeService; |
48 } | 49 } |
49 | 50 |
50 namespace data_usage { | 51 namespace data_usage { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
268 void ClearHostCache(); | 269 void ClearHostCache(); |
269 | 270 |
270 void InitializeNetworkSessionParams(net::HttpNetworkSession::Params* params); | 271 void InitializeNetworkSessionParams(net::HttpNetworkSession::Params* params); |
271 | 272 |
272 base::TimeTicks creation_time() const; | 273 base::TimeTicks creation_time() const; |
273 | 274 |
274 // Returns true if QUIC should be enabled for data reduction proxy, either as | 275 // Returns true if QUIC should be enabled for data reduction proxy, either as |
275 // a result of a field trial or a command line flag. | 276 // a result of a field trial or a command line flag. |
276 static bool ShouldEnableQuicForDataReductionProxy(); | 277 static bool ShouldEnableQuicForDataReductionProxy(); |
277 | 278 |
279 #if defined(OS_ANDROID) | |
280 base::WeakPtr<chrome::android::DataUseTabModel> data_use_tab_model() const { | |
281 return data_use_tab_model_; | |
282 } | |
283 #endif // defined(OS_ANDROID) | |
284 | |
278 private: | 285 private: |
279 // Map from name to value for all parameters associate with a field trial. | 286 // Map from name to value for all parameters associate with a field trial. |
280 typedef std::map<std::string, std::string> VariationParameters; | 287 typedef std::map<std::string, std::string> VariationParameters; |
281 | 288 |
282 // Provide SystemURLRequestContextGetter with access to | 289 // Provide SystemURLRequestContextGetter with access to |
283 // InitSystemRequestContext(). | 290 // InitSystemRequestContext(). |
284 friend class SystemURLRequestContextGetter; | 291 friend class SystemURLRequestContextGetter; |
285 | 292 |
286 friend class test::IOThreadPeer; | 293 friend class test::IOThreadPeer; |
287 | 294 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
530 system_url_request_context_getter_; | 537 system_url_request_context_getter_; |
531 | 538 |
532 // True if SPDY is disabled by policy. | 539 // True if SPDY is disabled by policy. |
533 bool is_spdy_disabled_by_policy_; | 540 bool is_spdy_disabled_by_policy_; |
534 | 541 |
535 // True if QUIC is allowed by policy. | 542 // True if QUIC is allowed by policy. |
536 bool is_quic_allowed_by_policy_; | 543 bool is_quic_allowed_by_policy_; |
537 | 544 |
538 const base::TimeTicks creation_time_; | 545 const base::TimeTicks creation_time_; |
539 | 546 |
547 #if defined(OS_ANDROID) | |
548 // WeakPtr to DataUseTabModel to be used on IO thread. | |
sclittle
2015/11/24 23:07:37
Please be more specific - data_use_tab_model_ shou
tbansal1
2015/11/25 20:55:16
Obsolete.
| |
549 base::WeakPtr<chrome::android::DataUseTabModel> data_use_tab_model_; | |
550 #endif // defined(OS_ANDROID) | |
551 | |
540 base::WeakPtrFactory<IOThread> weak_factory_; | 552 base::WeakPtrFactory<IOThread> weak_factory_; |
541 | 553 |
542 DISALLOW_COPY_AND_ASSIGN(IOThread); | 554 DISALLOW_COPY_AND_ASSIGN(IOThread); |
543 }; | 555 }; |
544 | 556 |
545 #endif // CHROME_BROWSER_IO_THREAD_H_ | 557 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |