| 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 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/prefs/pref_member.h" | 17 #include "base/prefs/pref_member.h" |
| 18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
| 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 20 #include "chrome/browser/io_thread.h" | 20 #include "chrome/browser/io_thread.h" |
| 21 #include "chrome/browser/net/chrome_url_request_context.h" | 21 #include "chrome/browser/net/chrome_url_request_context.h" |
| 22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/browser/profiles/storage_partition_descriptor.h" | 23 #include "chrome/browser/profiles/storage_partition_descriptor.h" |
| 24 #include "chrome/common/content_settings_types.h" | 24 #include "chrome/common/content_settings_types.h" |
| 25 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" |
| 25 #include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_sta
ts.h" | 26 #include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_sta
ts.h" |
| 26 #include "content/public/browser/content_browser_client.h" | 27 #include "content/public/browser/content_browser_client.h" |
| 27 #include "content/public/browser/resource_context.h" | 28 #include "content/public/browser/resource_context.h" |
| 28 #include "net/cookies/cookie_monster.h" | 29 #include "net/cookies/cookie_monster.h" |
| 29 #include "net/http/http_cache.h" | 30 #include "net/http/http_cache.h" |
| 30 #include "net/http/http_network_session.h" | 31 #include "net/http/http_network_session.h" |
| 31 #include "net/url_request/url_request_job_factory.h" | 32 #include "net/url_request/url_request_job_factory.h" |
| 32 | 33 |
| 33 class ChromeHttpUserAgentSettings; | 34 class ChromeHttpUserAgentSettings; |
| 34 class ChromeNetworkDelegate; | 35 class ChromeNetworkDelegate; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 prerender::PrerenderTracker* prerender_tracker; | 325 prerender::PrerenderTracker* prerender_tracker; |
| 325 }; | 326 }; |
| 326 | 327 |
| 327 explicit ProfileIOData(Profile::ProfileType profile_type); | 328 explicit ProfileIOData(Profile::ProfileType profile_type); |
| 328 | 329 |
| 329 static std::string GetSSLSessionCacheShard(); | 330 static std::string GetSSLSessionCacheShard(); |
| 330 | 331 |
| 331 void InitializeOnUIThread(Profile* profile); | 332 void InitializeOnUIThread(Profile* profile); |
| 332 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; | 333 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; |
| 333 | 334 |
| 334 #if defined(OS_ANDROID) | 335 // Setup data reduction proxy for given profile with params and usage_stats |
| 335 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 336 // from io thread globals. |
| 336 void SetDataReductionProxyUsageStatsOnIOThread(IOThread* io_thread, | 337 void SetupDataReductionProxyOnIOThread(IOThread* io_thread, |
| 337 Profile* profile); | 338 Profile* profile); |
| 338 void SetDataReductionProxyUsageStatsOnUIThread(Profile* profile, | 339 |
| 340 // Setup data reduction proxy for given profile, params, and usage_stats. |
| 341 void SetupDataReductionProxyOnUIThread(Profile* profile, |
| 342 data_reduction_proxy::DataReductionProxyParams* params, |
| 339 data_reduction_proxy::DataReductionProxyUsageStats* usage_stats); | 343 data_reduction_proxy::DataReductionProxyUsageStats* usage_stats); |
| 340 #endif | |
| 341 #endif | |
| 342 | 344 |
| 343 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults( | 345 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults( |
| 344 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory, | 346 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory, |
| 345 content::URLRequestInterceptorScopedVector request_interceptors, | 347 content::URLRequestInterceptorScopedVector request_interceptors, |
| 346 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 348 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 347 protocol_handler_interceptor, | 349 protocol_handler_interceptor, |
| 348 net::NetworkDelegate* network_delegate, | 350 net::NetworkDelegate* network_delegate, |
| 349 net::FtpTransactionFactory* ftp_transaction_factory) const; | 351 net::FtpTransactionFactory* ftp_transaction_factory) const; |
| 350 | 352 |
| 351 // Called when the profile is destroyed. | 353 // Called when the profile is destroyed. |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 supervised_user_url_filter_; | 602 supervised_user_url_filter_; |
| 601 #endif | 603 #endif |
| 602 | 604 |
| 603 mutable scoped_ptr<DevToolsNetworkController> network_controller_; | 605 mutable scoped_ptr<DevToolsNetworkController> network_controller_; |
| 604 | 606 |
| 605 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 607 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 606 bool initialized_on_UI_thread_; | 608 bool initialized_on_UI_thread_; |
| 607 | 609 |
| 608 const Profile::ProfileType profile_type_; | 610 const Profile::ProfileType profile_type_; |
| 609 | 611 |
| 612 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> |
| 613 data_reduction_proxy_settings_; |
| 614 |
| 610 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 615 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 611 }; | 616 }; |
| 612 | 617 |
| 613 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 618 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |