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 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "chrome/browser/appcache/chrome_appcache_service.h" | 13 #include "chrome/browser/appcache/chrome_appcache_service.h" |
14 #include "chrome/browser/chrome_blob_storage_context.h" | 14 #include "chrome/browser/chrome_blob_storage_context.h" |
15 #include "chrome/browser/content_settings/host_content_settings_map.h" | 15 #include "chrome/browser/content_settings/host_content_settings_map.h" |
16 #include "chrome/browser/extensions/extension_info_map.h" | 16 #include "chrome/browser/extensions/extension_info_map.h" |
17 #include "chrome/browser/file_system/browser_file_system_context.h" | |
18 #include "chrome/browser/host_zoom_map.h" | 17 #include "chrome/browser/host_zoom_map.h" |
19 #include "chrome/browser/io_thread.h" | 18 #include "chrome/browser/io_thread.h" |
20 #include "chrome/browser/net/chrome_cookie_policy.h" | 19 #include "chrome/browser/net/chrome_cookie_policy.h" |
21 #include "chrome/browser/prefs/pref_change_registrar.h" | 20 #include "chrome/browser/prefs/pref_change_registrar.h" |
22 #include "chrome/browser/prefs/pref_service.h" | 21 #include "chrome/browser/prefs/pref_service.h" |
23 #include "chrome/common/extensions/extension_icon_set.h" | 22 #include "chrome/common/extensions/extension_icon_set.h" |
24 #include "chrome/common/net/url_request_context_getter.h" | 23 #include "chrome/common/net/url_request_context_getter.h" |
25 #include "chrome/common/notification_registrar.h" | 24 #include "chrome/common/notification_registrar.h" |
26 #include "net/base/cookie_monster.h" | 25 #include "net/base/cookie_monster.h" |
27 #include "net/base/cookie_policy.h" | 26 #include "net/base/cookie_policy.h" |
28 #include "net/url_request/url_request_context.h" | 27 #include "net/url_request/url_request_context.h" |
29 #include "webkit/database/database_tracker.h" | 28 #include "webkit/database/database_tracker.h" |
| 29 #include "webkit/fileapi/sandboxed_file_system_context.h" |
30 | 30 |
31 class CommandLine; | 31 class CommandLine; |
32 class PrefService; | 32 class PrefService; |
33 class Profile; | 33 class Profile; |
34 | 34 |
35 namespace net { | 35 namespace net { |
36 class DnsCertProvenanceChecker; | 36 class DnsCertProvenanceChecker; |
37 class NetworkDelegate; | 37 class NetworkDelegate; |
38 } | 38 } |
39 | 39 |
(...skipping 24 matching lines...) Expand all Loading... |
64 webkit_database::DatabaseTracker* database_tracker() const { | 64 webkit_database::DatabaseTracker* database_tracker() const { |
65 return database_tracker_.get(); | 65 return database_tracker_.get(); |
66 } | 66 } |
67 | 67 |
68 // Gets the blob storage context associated with this context's profile. | 68 // Gets the blob storage context associated with this context's profile. |
69 ChromeBlobStorageContext* blob_storage_context() const { | 69 ChromeBlobStorageContext* blob_storage_context() const { |
70 return blob_storage_context_.get(); | 70 return blob_storage_context_.get(); |
71 } | 71 } |
72 | 72 |
73 // Gets the file system host context with this context's profile. | 73 // Gets the file system host context with this context's profile. |
74 BrowserFileSystemContext* browser_file_system_context() const { | 74 fileapi::SandboxedFileSystemContext* file_system_context() const { |
75 return browser_file_system_context_.get(); | 75 return file_system_context_.get(); |
76 } | 76 } |
77 | 77 |
78 bool is_off_the_record() const { | 78 bool is_off_the_record() const { |
79 return is_off_the_record_; | 79 return is_off_the_record_; |
80 } | 80 } |
81 bool is_media() const { | 81 bool is_media() const { |
82 return is_media_; | 82 return is_media_; |
83 } | 83 } |
84 | 84 |
85 virtual const std::string& GetUserAgent(const GURL& url) const; | 85 virtual const std::string& GetUserAgent(const GURL& url) const; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 void set_appcache_service(ChromeAppCacheService* service) { | 171 void set_appcache_service(ChromeAppCacheService* service) { |
172 appcache_service_ = service; | 172 appcache_service_ = service; |
173 } | 173 } |
174 void set_database_tracker(webkit_database::DatabaseTracker* tracker) { | 174 void set_database_tracker(webkit_database::DatabaseTracker* tracker) { |
175 database_tracker_ = tracker; | 175 database_tracker_ = tracker; |
176 } | 176 } |
177 void set_blob_storage_context(ChromeBlobStorageContext* context) { | 177 void set_blob_storage_context(ChromeBlobStorageContext* context) { |
178 blob_storage_context_ = context; | 178 blob_storage_context_ = context; |
179 } | 179 } |
180 void set_browser_file_system_context(BrowserFileSystemContext* context) { | 180 void set_file_system_context(fileapi::SandboxedFileSystemContext* context) { |
181 browser_file_system_context_ = context; | 181 file_system_context_ = context; |
182 } | 182 } |
183 void set_extension_info_map(ExtensionInfoMap* map) { | 183 void set_extension_info_map(ExtensionInfoMap* map) { |
184 extension_info_map_ = map; | 184 extension_info_map_ = map; |
185 } | 185 } |
186 void set_net_log(net::NetLog* net_log) { | 186 void set_net_log(net::NetLog* net_log) { |
187 net_log_ = net_log; | 187 net_log_ = net_log; |
188 } | 188 } |
189 void set_network_delegate( | 189 void set_network_delegate( |
190 net::HttpNetworkDelegate* network_delegate) { | 190 net::HttpNetworkDelegate* network_delegate) { |
191 network_delegate_ = network_delegate; | 191 network_delegate_ = network_delegate; |
192 } | 192 } |
193 | 193 |
194 // Callback for when the accept language changes. | 194 // Callback for when the accept language changes. |
195 void OnAcceptLanguageChange(const std::string& accept_language); | 195 void OnAcceptLanguageChange(const std::string& accept_language); |
196 | 196 |
197 // Callback for when the default charset changes. | 197 // Callback for when the default charset changes. |
198 void OnDefaultCharsetChange(const std::string& default_charset); | 198 void OnDefaultCharsetChange(const std::string& default_charset); |
199 | 199 |
200 protected: | 200 protected: |
201 // Path to the directory user scripts are stored in. | 201 // Path to the directory user scripts are stored in. |
202 FilePath user_script_dir_path_; | 202 FilePath user_script_dir_path_; |
203 | 203 |
204 scoped_refptr<ChromeAppCacheService> appcache_service_; | 204 scoped_refptr<ChromeAppCacheService> appcache_service_; |
205 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 205 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
206 scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_; | 206 scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_; |
207 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 207 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
208 scoped_refptr<HostZoomMap> host_zoom_map_; | 208 scoped_refptr<HostZoomMap> host_zoom_map_; |
209 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 209 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
210 scoped_refptr<BrowserFileSystemContext> browser_file_system_context_; | 210 scoped_refptr<fileapi::SandboxedFileSystemContext> file_system_context_; |
211 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 211 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
212 | 212 |
213 bool is_media_; | 213 bool is_media_; |
214 bool is_off_the_record_; | 214 bool is_off_the_record_; |
215 | 215 |
216 private: | 216 private: |
217 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext); | 217 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext); |
218 }; | 218 }; |
219 | 219 |
220 // A URLRequestContextGetter subclass used by the browser. This returns a | 220 // A URLRequestContextGetter subclass used by the browser. This returns a |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 // user scripts. | 369 // user scripts. |
370 FilePath user_script_dir_path_; | 370 FilePath user_script_dir_path_; |
371 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 371 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
372 scoped_refptr<ChromeAppCacheService> appcache_service_; | 372 scoped_refptr<ChromeAppCacheService> appcache_service_; |
373 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 373 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
374 scoped_refptr<HostZoomMap> host_zoom_map_; | 374 scoped_refptr<HostZoomMap> host_zoom_map_; |
375 scoped_refptr<net::TransportSecurityState> transport_security_state_; | 375 scoped_refptr<net::TransportSecurityState> transport_security_state_; |
376 scoped_refptr<net::SSLConfigService> ssl_config_service_; | 376 scoped_refptr<net::SSLConfigService> ssl_config_service_; |
377 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate_; | 377 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate_; |
378 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 378 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
379 scoped_refptr<BrowserFileSystemContext> browser_file_system_context_; | 379 scoped_refptr<fileapi::SandboxedFileSystemContext> file_system_context_; |
380 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 380 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
381 | 381 |
382 FilePath profile_dir_path_; | 382 FilePath profile_dir_path_; |
383 | 383 |
384 private: | 384 private: |
385 IOThread* const io_thread_; | 385 IOThread* const io_thread_; |
386 | 386 |
387 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); | 387 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); |
388 }; | 388 }; |
389 | 389 |
390 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 390 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |