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_PROFILES_PROFILE_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.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/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/prefs/pref_member.h" | 18 #include "base/prefs/pref_member.h" |
19 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
21 #include "chrome/browser/io_thread.h" | 21 #include "chrome/browser/io_thread.h" |
22 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
h" | 22 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
h" |
23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/profiles/storage_partition_descriptor.h" | 24 #include "chrome/browser/profiles/storage_partition_descriptor.h" |
25 #include "components/content_settings/core/common/content_settings_types.h" | 25 #include "components/content_settings/core/common/content_settings_types.h" |
26 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth
_request_handler.h" | 26 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth
_request_handler.h" |
| 27 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw
ork_delegate.h" |
27 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat
istics_prefs.h" | 28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat
istics_prefs.h" |
28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag
e_stats.h" | 29 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag
e_stats.h" |
29 #include "content/public/browser/content_browser_client.h" | 30 #include "content/public/browser/content_browser_client.h" |
30 #include "content/public/browser/resource_context.h" | 31 #include "content/public/browser/resource_context.h" |
31 #include "net/cookies/cookie_monster.h" | 32 #include "net/cookies/cookie_monster.h" |
32 #include "net/http/http_cache.h" | 33 #include "net/http/http_cache.h" |
33 #include "net/http/http_network_session.h" | 34 #include "net/http/http_network_session.h" |
34 #include "net/url_request/url_request_context.h" | 35 #include "net/url_request/url_request_context.h" |
35 #include "net/url_request/url_request_job_factory.h" | 36 #include "net/url_request/url_request_job_factory.h" |
36 | 37 |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 return data_reduction_proxy_auth_request_handler_.get(); | 432 return data_reduction_proxy_auth_request_handler_.get(); |
432 } | 433 } |
433 | 434 |
434 void set_data_reduction_proxy_auth_request_handler( | 435 void set_data_reduction_proxy_auth_request_handler( |
435 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> | 436 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> |
436 data_reduction_proxy_auth_request_handler) const { | 437 data_reduction_proxy_auth_request_handler) const { |
437 data_reduction_proxy_auth_request_handler_ = | 438 data_reduction_proxy_auth_request_handler_ = |
438 data_reduction_proxy_auth_request_handler.Pass(); | 439 data_reduction_proxy_auth_request_handler.Pass(); |
439 } | 440 } |
440 | 441 |
441 ChromeNetworkDelegate* network_delegate() const { | 442 ChromeNetworkDelegate* chrome_network_delegate() const { |
442 return network_delegate_.get(); | 443 return chrome_network_delegate_; |
| 444 } |
| 445 |
| 446 data_reduction_proxy::DataReductionProxyNetworkDelegate* network_delegate() |
| 447 const { |
| 448 return data_reduction_proxy_network_delegate_.get(); |
443 } | 449 } |
444 | 450 |
445 net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const { | 451 net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const { |
446 return fraudulent_certificate_reporter_.get(); | 452 return fraudulent_certificate_reporter_.get(); |
447 } | 453 } |
448 | 454 |
449 net::ProxyService* proxy_service() const { | 455 net::ProxyService* proxy_service() const { |
450 return proxy_service_.get(); | 456 return proxy_service_.get(); |
451 } | 457 } |
452 | 458 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 646 |
641 // data_reduction_proxy_* classes must be declared before |network_delegate_|. | 647 // data_reduction_proxy_* classes must be declared before |network_delegate_|. |
642 // The data_reduction_proxy_* classes are passed in to |network_delegate_|, | 648 // The data_reduction_proxy_* classes are passed in to |network_delegate_|, |
643 // so this ordering ensures that the |network_delegate_| never references | 649 // so this ordering ensures that the |network_delegate_| never references |
644 // freed objects. | 650 // freed objects. |
645 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyParams> | 651 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyParams> |
646 data_reduction_proxy_params_; | 652 data_reduction_proxy_params_; |
647 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats> | 653 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats> |
648 data_reduction_proxy_usage_stats_; | 654 data_reduction_proxy_usage_stats_; |
649 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> | 655 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> |
650 data_reduction_proxy_statistics_prefs_; | 656 data_reduction_proxy_statistics_prefs_; |
651 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_; | 657 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_; |
652 mutable scoped_ptr<DataReductionProxyChromeConfigurator> | 658 mutable scoped_ptr<DataReductionProxyChromeConfigurator> |
653 data_reduction_proxy_chrome_configurator_; | 659 data_reduction_proxy_chrome_configurator_; |
654 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> | 660 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> |
655 data_reduction_proxy_auth_request_handler_; | 661 data_reduction_proxy_auth_request_handler_; |
656 | 662 |
657 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; | 663 mutable ChromeNetworkDelegate* chrome_network_delegate_; |
| 664 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyNetworkDelegate> |
| 665 data_reduction_proxy_network_delegate_; |
658 mutable scoped_ptr<net::FraudulentCertificateReporter> | 666 mutable scoped_ptr<net::FraudulentCertificateReporter> |
659 fraudulent_certificate_reporter_; | 667 fraudulent_certificate_reporter_; |
660 mutable scoped_ptr<net::ProxyService> proxy_service_; | 668 mutable scoped_ptr<net::ProxyService> proxy_service_; |
661 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; | 669 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; |
662 mutable scoped_ptr<net::HttpServerProperties> | 670 mutable scoped_ptr<net::HttpServerProperties> |
663 http_server_properties_; | 671 http_server_properties_; |
664 #if defined(OS_CHROMEOS) | 672 #if defined(OS_CHROMEOS) |
665 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that | 673 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that |
666 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. | 674 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. |
667 mutable policy::PolicyCertVerifier* policy_cert_verifier_; | 675 mutable policy::PolicyCertVerifier* policy_cert_verifier_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 | 710 |
703 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 711 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
704 bool initialized_on_UI_thread_; | 712 bool initialized_on_UI_thread_; |
705 | 713 |
706 const Profile::ProfileType profile_type_; | 714 const Profile::ProfileType profile_type_; |
707 | 715 |
708 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 716 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
709 }; | 717 }; |
710 | 718 |
711 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 719 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |