| 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 "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_store.h" | 30 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_store.h" |
| 30 #include "content/public/browser/content_browser_client.h" | 31 #include "content/public/browser/content_browser_client.h" |
| 31 #include "content/public/browser/resource_context.h" | 32 #include "content/public/browser/resource_context.h" |
| 32 #include "net/cookies/cookie_monster.h" | 33 #include "net/cookies/cookie_monster.h" |
| 33 #include "net/http/http_cache.h" | 34 #include "net/http/http_cache.h" |
| 34 #include "net/http/http_network_session.h" | 35 #include "net/http/http_network_session.h" |
| 35 #include "net/url_request/url_request_context.h" | 36 #include "net/url_request/url_request_context.h" |
| 36 #include "net/url_request/url_request_job_factory.h" | 37 #include "net/url_request/url_request_job_factory.h" |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 return data_reduction_proxy_event_store_.get(); | 445 return data_reduction_proxy_event_store_.get(); |
| 445 } | 446 } |
| 446 | 447 |
| 447 void set_data_reduction_proxy_event_store( | 448 void set_data_reduction_proxy_event_store( |
| 448 scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> | 449 scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> |
| 449 data_reduction_proxy_event_store) const { | 450 data_reduction_proxy_event_store) const { |
| 450 data_reduction_proxy_event_store_ = | 451 data_reduction_proxy_event_store_ = |
| 451 data_reduction_proxy_event_store.Pass(); | 452 data_reduction_proxy_event_store.Pass(); |
| 452 } | 453 } |
| 453 | 454 |
| 454 ChromeNetworkDelegate* network_delegate() const { | 455 ChromeNetworkDelegate* chrome_network_delegate() const { |
| 455 return network_delegate_.get(); | 456 return chrome_network_delegate_; |
| 457 } |
| 458 |
| 459 data_reduction_proxy::DataReductionProxyNetworkDelegate* |
| 460 network_delegate() const { |
| 461 return data_reduction_proxy_network_delegate_.get(); |
| 456 } | 462 } |
| 457 | 463 |
| 458 net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const { | 464 net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const { |
| 459 return fraudulent_certificate_reporter_.get(); | 465 return fraudulent_certificate_reporter_.get(); |
| 460 } | 466 } |
| 461 | 467 |
| 462 net::ProxyService* proxy_service() const { | 468 net::ProxyService* proxy_service() const { |
| 463 return proxy_service_.get(); | 469 return proxy_service_.get(); |
| 464 } | 470 } |
| 465 | 471 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 | 659 |
| 654 // data_reduction_proxy_* classes must be declared before |network_delegate_|. | 660 // data_reduction_proxy_* classes must be declared before |network_delegate_|. |
| 655 // The data_reduction_proxy_* classes are passed in to |network_delegate_|, | 661 // The data_reduction_proxy_* classes are passed in to |network_delegate_|, |
| 656 // so this ordering ensures that the |network_delegate_| never references | 662 // so this ordering ensures that the |network_delegate_| never references |
| 657 // freed objects. | 663 // freed objects. |
| 658 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyParams> | 664 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyParams> |
| 659 data_reduction_proxy_params_; | 665 data_reduction_proxy_params_; |
| 660 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats> | 666 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats> |
| 661 data_reduction_proxy_usage_stats_; | 667 data_reduction_proxy_usage_stats_; |
| 662 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> | 668 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> |
| 663 data_reduction_proxy_statistics_prefs_; | 669 data_reduction_proxy_statistics_prefs_; |
| 664 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_; | 670 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_; |
| 665 mutable scoped_ptr<DataReductionProxyChromeConfigurator> | 671 mutable scoped_ptr<DataReductionProxyChromeConfigurator> |
| 666 data_reduction_proxy_chrome_configurator_; | 672 data_reduction_proxy_chrome_configurator_; |
| 667 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> | 673 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> |
| 668 data_reduction_proxy_auth_request_handler_; | 674 data_reduction_proxy_auth_request_handler_; |
| 669 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> | 675 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> |
| 670 data_reduction_proxy_event_store_; | 676 data_reduction_proxy_event_store_; |
| 671 | 677 |
| 672 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; | 678 mutable ChromeNetworkDelegate* chrome_network_delegate_; |
| 679 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyNetworkDelegate> |
| 680 data_reduction_proxy_network_delegate_; |
| 673 mutable scoped_ptr<net::FraudulentCertificateReporter> | 681 mutable scoped_ptr<net::FraudulentCertificateReporter> |
| 674 fraudulent_certificate_reporter_; | 682 fraudulent_certificate_reporter_; |
| 675 mutable scoped_ptr<net::ProxyService> proxy_service_; | 683 mutable scoped_ptr<net::ProxyService> proxy_service_; |
| 676 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; | 684 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; |
| 677 mutable scoped_ptr<net::HttpServerProperties> | 685 mutable scoped_ptr<net::HttpServerProperties> |
| 678 http_server_properties_; | 686 http_server_properties_; |
| 679 #if defined(OS_CHROMEOS) | 687 #if defined(OS_CHROMEOS) |
| 680 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that | 688 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that |
| 681 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. | 689 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. |
| 682 mutable policy::PolicyCertVerifier* policy_cert_verifier_; | 690 mutable policy::PolicyCertVerifier* policy_cert_verifier_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 | 725 |
| 718 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 726 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 719 bool initialized_on_UI_thread_; | 727 bool initialized_on_UI_thread_; |
| 720 | 728 |
| 721 const Profile::ProfileType profile_type_; | 729 const Profile::ProfileType profile_type_; |
| 722 | 730 |
| 723 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 731 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 724 }; | 732 }; |
| 725 | 733 |
| 726 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 734 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |