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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
283 void ClearHostCache(); | 283 void ClearHostCache(); |
284 | 284 |
285 void InitializeNetworkSessionParams(net::HttpNetworkSession::Params* params); | 285 void InitializeNetworkSessionParams(net::HttpNetworkSession::Params* params); |
286 | 286 |
287 base::TimeTicks creation_time() const; | 287 base::TimeTicks creation_time() const; |
288 | 288 |
289 // Returns true if QUIC should be enabled for data reduction proxy, either as | 289 // Returns true if QUIC should be enabled for data reduction proxy, either as |
290 // a result of a field trial or a command line flag. | 290 // a result of a field trial or a command line flag. |
291 static bool ShouldEnableQuicForDataReductionProxy(); | 291 static bool ShouldEnableQuicForDataReductionProxy(); |
292 | 292 |
293 // Returns the callback fro updating data use prefs. | |
294 const metrics::UpdateUsagePrefCallbackType GetMetricsDataUseForwarder(); | |
Alexei Svitkine (slow)
2016/04/05 15:58:57
Nit: Return by const ref.
gayane -on leave until 09-2017
2016/04/05 17:24:45
Done.
| |
295 | |
293 private: | 296 private: |
294 // Map from name to value for all parameters associate with a field trial. | 297 // Map from name to value for all parameters associate with a field trial. |
295 typedef std::map<std::string, std::string> VariationParameters; | 298 typedef std::map<std::string, std::string> VariationParameters; |
296 | 299 |
297 // Provide SystemURLRequestContextGetter with access to | 300 // Provide SystemURLRequestContextGetter with access to |
298 // InitSystemRequestContext(). | 301 // InitSystemRequestContext(). |
299 friend class SystemURLRequestContextGetter; | 302 friend class SystemURLRequestContextGetter; |
300 | 303 |
301 friend class test::IOThreadPeer; | 304 friend class test::IOThreadPeer; |
302 | 305 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
591 system_url_request_context_getter_; | 594 system_url_request_context_getter_; |
592 | 595 |
593 // True if SPDY is disabled by policy. | 596 // True if SPDY is disabled by policy. |
594 bool is_spdy_disabled_by_policy_; | 597 bool is_spdy_disabled_by_policy_; |
595 | 598 |
596 // True if QUIC is allowed by policy. | 599 // True if QUIC is allowed by policy. |
597 bool is_quic_allowed_by_policy_; | 600 bool is_quic_allowed_by_policy_; |
598 | 601 |
599 const base::TimeTicks creation_time_; | 602 const base::TimeTicks creation_time_; |
600 | 603 |
604 // Callback for updating data use prefs which needs to be initialized on UI | |
605 // thread and passed to |ChromeNetworkDelegate|. | |
606 metrics::UpdateUsagePrefCallbackType metrics_data_use_forwarder_; | |
607 | |
601 base::WeakPtrFactory<IOThread> weak_factory_; | 608 base::WeakPtrFactory<IOThread> weak_factory_; |
602 | 609 |
603 DISALLOW_COPY_AND_ASSIGN(IOThread); | 610 DISALLOW_COPY_AND_ASSIGN(IOThread); |
604 }; | 611 }; |
605 | 612 |
606 #endif // CHROME_BROWSER_IO_THREAD_H_ | 613 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |