| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/net/chrome_url_request_context.h" | 5 #include "chrome/browser/net/chrome_url_request_context.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 // Set ChromeURLRequestContext members | 843 // Set ChromeURLRequestContext members |
| 844 user_script_dir_path_ = other->user_script_dir_path_; | 844 user_script_dir_path_ = other->user_script_dir_path_; |
| 845 appcache_service_ = other->appcache_service_; | 845 appcache_service_ = other->appcache_service_; |
| 846 database_tracker_ = other->database_tracker_; | 846 database_tracker_ = other->database_tracker_; |
| 847 chrome_cookie_policy_ = other->chrome_cookie_policy_; | 847 chrome_cookie_policy_ = other->chrome_cookie_policy_; |
| 848 host_content_settings_map_ = other->host_content_settings_map_; | 848 host_content_settings_map_ = other->host_content_settings_map_; |
| 849 host_zoom_map_ = other->host_zoom_map_; | 849 host_zoom_map_ = other->host_zoom_map_; |
| 850 is_media_ = other->is_media_; | 850 is_media_ = other->is_media_; |
| 851 is_off_the_record_ = other->is_off_the_record_; | 851 is_off_the_record_ = other->is_off_the_record_; |
| 852 blob_storage_context_ = other->blob_storage_context_; | 852 blob_storage_context_ = other->blob_storage_context_; |
| 853 browser_file_system_context_ = other->browser_file_system_context_; | 853 file_system_context_ = other->file_system_context_; |
| 854 extension_info_map_ = other->extension_info_map_; | 854 extension_info_map_ = other->extension_info_map_; |
| 855 } | 855 } |
| 856 | 856 |
| 857 void ChromeURLRequestContext::OnAcceptLanguageChange( | 857 void ChromeURLRequestContext::OnAcceptLanguageChange( |
| 858 const std::string& accept_language) { | 858 const std::string& accept_language) { |
| 859 CheckCurrentlyOnIOThread(); | 859 CheckCurrentlyOnIOThread(); |
| 860 accept_language_ = | 860 accept_language_ = |
| 861 net::HttpUtil::GenerateAcceptLanguageHeader(accept_language); | 861 net::HttpUtil::GenerateAcceptLanguageHeader(accept_language); |
| 862 } | 862 } |
| 863 | 863 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 | 912 |
| 913 if (profile->GetUserScriptMaster()) | 913 if (profile->GetUserScriptMaster()) |
| 914 user_script_dir_path_ = profile->GetUserScriptMaster()->user_script_dir(); | 914 user_script_dir_path_ = profile->GetUserScriptMaster()->user_script_dir(); |
| 915 | 915 |
| 916 ssl_config_service_ = profile->GetSSLConfigService(); | 916 ssl_config_service_ = profile->GetSSLConfigService(); |
| 917 profile_dir_path_ = profile->GetPath(); | 917 profile_dir_path_ = profile->GetPath(); |
| 918 cookie_monster_delegate_ = new ChromeCookieMonsterDelegate(profile); | 918 cookie_monster_delegate_ = new ChromeCookieMonsterDelegate(profile); |
| 919 appcache_service_ = profile->GetAppCacheService(); | 919 appcache_service_ = profile->GetAppCacheService(); |
| 920 database_tracker_ = profile->GetDatabaseTracker(); | 920 database_tracker_ = profile->GetDatabaseTracker(); |
| 921 blob_storage_context_ = profile->GetBlobStorageContext(); | 921 blob_storage_context_ = profile->GetBlobStorageContext(); |
| 922 browser_file_system_context_ = profile->GetFileSystemContext(); | 922 file_system_context_ = profile->GetFileSystemContext(); |
| 923 extension_info_map_ = profile->GetExtensionInfoMap(); | 923 extension_info_map_ = profile->GetExtensionInfoMap(); |
| 924 } | 924 } |
| 925 | 925 |
| 926 ChromeURLRequestContextFactory::~ChromeURLRequestContextFactory() { | 926 ChromeURLRequestContextFactory::~ChromeURLRequestContextFactory() { |
| 927 CheckCurrentlyOnIOThread(); | 927 CheckCurrentlyOnIOThread(); |
| 928 } | 928 } |
| 929 | 929 |
| 930 void ChromeURLRequestContextFactory::ApplyProfileParametersToContext( | 930 void ChromeURLRequestContextFactory::ApplyProfileParametersToContext( |
| 931 ChromeURLRequestContext* context) { | 931 ChromeURLRequestContext* context) { |
| 932 // Apply all the parameters. NOTE: keep this in sync with | 932 // Apply all the parameters. NOTE: keep this in sync with |
| 933 // ChromeURLRequestContextFactory(Profile*). | 933 // ChromeURLRequestContextFactory(Profile*). |
| 934 context->set_is_media(is_media_); | 934 context->set_is_media(is_media_); |
| 935 context->set_is_off_the_record(is_off_the_record_); | 935 context->set_is_off_the_record(is_off_the_record_); |
| 936 context->set_accept_language(accept_language_); | 936 context->set_accept_language(accept_language_); |
| 937 context->set_accept_charset(accept_charset_); | 937 context->set_accept_charset(accept_charset_); |
| 938 context->set_referrer_charset(referrer_charset_); | 938 context->set_referrer_charset(referrer_charset_); |
| 939 context->set_user_script_dir_path(user_script_dir_path_); | 939 context->set_user_script_dir_path(user_script_dir_path_); |
| 940 context->set_host_content_settings_map(host_content_settings_map_); | 940 context->set_host_content_settings_map(host_content_settings_map_); |
| 941 context->set_host_zoom_map(host_zoom_map_); | 941 context->set_host_zoom_map(host_zoom_map_); |
| 942 context->set_transport_security_state( | 942 context->set_transport_security_state( |
| 943 transport_security_state_); | 943 transport_security_state_); |
| 944 context->set_ssl_config_service(ssl_config_service_); | 944 context->set_ssl_config_service(ssl_config_service_); |
| 945 context->set_appcache_service(appcache_service_); | 945 context->set_appcache_service(appcache_service_); |
| 946 context->set_database_tracker(database_tracker_); | 946 context->set_database_tracker(database_tracker_); |
| 947 context->set_blob_storage_context(blob_storage_context_); | 947 context->set_blob_storage_context(blob_storage_context_); |
| 948 context->set_browser_file_system_context(browser_file_system_context_); | 948 context->set_file_system_context(file_system_context_); |
| 949 context->set_extension_info_map(extension_info_map_); | 949 context->set_extension_info_map(extension_info_map_); |
| 950 } | 950 } |
| OLD | NEW |