| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/content_settings/host_content_settings_map.h" | 13 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 14 #include "chrome/browser/extensions/extension_info_map.h" | 14 #include "chrome/browser/extensions/extension_info_map.h" |
| 15 #include "chrome/browser/extensions/extension_webrequest_api.h" | 15 #include "chrome/browser/extensions/extension_webrequest_api.h" |
| 16 #include "chrome/browser/prefs/pref_change_registrar.h" | 16 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 17 #include "chrome/browser/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
| 18 #include "chrome/browser/prerender/prerender_manager.h" | 18 #include "chrome/browser/prerender/prerender_manager.h" |
| 19 #include "chrome/common/extensions/extension_icon_set.h" | 19 #include "chrome/common/extensions/extension_icon_set.h" |
| 20 #include "content/browser/appcache/chrome_appcache_service.h" | 20 #include "content/browser/appcache/chrome_appcache_service.h" |
| 21 #include "content/browser/chrome_blob_storage_context.h" | 21 #include "content/browser/chrome_blob_storage_context.h" |
| 22 #include "content/browser/host_zoom_map.h" | 22 #include "content/browser/host_zoom_map.h" |
| 23 #include "net/base/cookie_policy.h" | 23 #include "net/base/cookie_policy.h" |
| 24 #include "net/url_request/url_request_context.h" | 24 #include "net/url_request/url_request_context.h" |
| 25 #include "net/url_request/url_request_context_getter.h" | 25 #include "net/url_request/url_request_context_getter.h" |
| 26 #include "webkit/database/database_tracker.h" | |
| 27 #include "webkit/fileapi/file_system_context.h" | 26 #include "webkit/fileapi/file_system_context.h" |
| 28 | 27 |
| 29 class ChromeURLDataManagerBackend; | 28 class ChromeURLDataManagerBackend; |
| 30 class ChromeURLRequestContextFactory; | 29 class ChromeURLRequestContextFactory; |
| 31 class IOThread; | 30 class IOThread; |
| 32 namespace net { | 31 namespace net { |
| 33 class DnsCertProvenanceChecker; | 32 class DnsCertProvenanceChecker; |
| 34 class NetworkDelegate; | 33 class NetworkDelegate; |
| 35 } | 34 } |
| 36 class PrefService; | 35 class PrefService; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 53 FilePath user_script_dir_path() const { | 52 FilePath user_script_dir_path() const { |
| 54 return user_script_dir_path_; | 53 return user_script_dir_path_; |
| 55 } | 54 } |
| 56 | 55 |
| 57 // Gets the appcache service to be used for requests in this context. | 56 // Gets the appcache service to be used for requests in this context. |
| 58 // May be NULL if requests for this context aren't subject to appcaching. | 57 // May be NULL if requests for this context aren't subject to appcaching. |
| 59 ChromeAppCacheService* appcache_service() const { | 58 ChromeAppCacheService* appcache_service() const { |
| 60 return appcache_service_.get(); | 59 return appcache_service_.get(); |
| 61 } | 60 } |
| 62 | 61 |
| 63 // Gets the database tracker associated with this context's profile. | |
| 64 webkit_database::DatabaseTracker* database_tracker() const { | |
| 65 return database_tracker_.get(); | |
| 66 } | |
| 67 | |
| 68 // Gets the blob storage context associated with this context's profile. | 62 // Gets the blob storage context associated with this context's profile. |
| 69 ChromeBlobStorageContext* blob_storage_context() const { | 63 ChromeBlobStorageContext* blob_storage_context() const { |
| 70 return blob_storage_context_.get(); | 64 return blob_storage_context_.get(); |
| 71 } | 65 } |
| 72 | 66 |
| 73 // Gets the file system host context with this context's profile. | 67 // Gets the file system host context with this context's profile. |
| 74 fileapi::FileSystemContext* file_system_context() const { | 68 fileapi::FileSystemContext* file_system_context() const { |
| 75 return file_system_context_.get(); | 69 return file_system_context_.get(); |
| 76 } | 70 } |
| 77 | 71 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 107 void set_host_content_settings_map( | 101 void set_host_content_settings_map( |
| 108 HostContentSettingsMap* host_content_settings_map) { | 102 HostContentSettingsMap* host_content_settings_map) { |
| 109 host_content_settings_map_ = host_content_settings_map; | 103 host_content_settings_map_ = host_content_settings_map; |
| 110 } | 104 } |
| 111 void set_host_zoom_map(HostZoomMap* host_zoom_map) { | 105 void set_host_zoom_map(HostZoomMap* host_zoom_map) { |
| 112 host_zoom_map_ = host_zoom_map; | 106 host_zoom_map_ = host_zoom_map; |
| 113 } | 107 } |
| 114 void set_appcache_service(ChromeAppCacheService* service) { | 108 void set_appcache_service(ChromeAppCacheService* service) { |
| 115 appcache_service_ = service; | 109 appcache_service_ = service; |
| 116 } | 110 } |
| 117 void set_database_tracker(webkit_database::DatabaseTracker* tracker) { | |
| 118 database_tracker_ = tracker; | |
| 119 } | |
| 120 void set_blob_storage_context(ChromeBlobStorageContext* context) { | 111 void set_blob_storage_context(ChromeBlobStorageContext* context) { |
| 121 blob_storage_context_ = context; | 112 blob_storage_context_ = context; |
| 122 } | 113 } |
| 123 void set_file_system_context(fileapi::FileSystemContext* context) { | 114 void set_file_system_context(fileapi::FileSystemContext* context) { |
| 124 file_system_context_ = context; | 115 file_system_context_ = context; |
| 125 } | 116 } |
| 126 void set_extension_info_map(ExtensionInfoMap* map) { | 117 void set_extension_info_map(ExtensionInfoMap* map) { |
| 127 extension_info_map_ = map; | 118 extension_info_map_ = map; |
| 128 } | 119 } |
| 129 void set_prerender_manager(prerender::PrerenderManager* prerender_manager) { | 120 void set_prerender_manager(prerender::PrerenderManager* prerender_manager) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 143 // --------------------------------------------------------------------------- | 134 // --------------------------------------------------------------------------- |
| 144 // Important: When adding any new members below, consider whether they need to | 135 // Important: When adding any new members below, consider whether they need to |
| 145 // be added to CopyFrom. | 136 // be added to CopyFrom. |
| 146 // --------------------------------------------------------------------------- | 137 // --------------------------------------------------------------------------- |
| 147 | 138 |
| 148 // Path to the directory user scripts are stored in. | 139 // Path to the directory user scripts are stored in. |
| 149 FilePath user_script_dir_path_; | 140 FilePath user_script_dir_path_; |
| 150 | 141 |
| 151 // TODO(willchan): Make these non-refcounted. | 142 // TODO(willchan): Make these non-refcounted. |
| 152 scoped_refptr<ChromeAppCacheService> appcache_service_; | 143 scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 153 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | |
| 154 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 144 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 155 scoped_refptr<HostZoomMap> host_zoom_map_; | 145 scoped_refptr<HostZoomMap> host_zoom_map_; |
| 156 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 146 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 157 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 147 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 158 // TODO(aa): This should use chrome/common/extensions/extension_set.h. | 148 // TODO(aa): This should use chrome/common/extensions/extension_set.h. |
| 159 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 149 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 160 scoped_refptr<prerender::PrerenderManager> prerender_manager_; | 150 scoped_refptr<prerender::PrerenderManager> prerender_manager_; |
| 161 scoped_ptr<ChromeURLDataManagerBackend> chrome_url_data_manager_backend_; | 151 scoped_ptr<ChromeURLDataManagerBackend> chrome_url_data_manager_backend_; |
| 162 | 152 |
| 163 bool is_incognito_; | 153 bool is_incognito_; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 275 |
| 286 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext | 276 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext |
| 287 // instance that was lazilly created by GetURLRequestContext. | 277 // instance that was lazilly created by GetURLRequestContext. |
| 288 // Access only from the IO thread. | 278 // Access only from the IO thread. |
| 289 scoped_refptr<net::URLRequestContext> url_request_context_; | 279 scoped_refptr<net::URLRequestContext> url_request_context_; |
| 290 | 280 |
| 291 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); | 281 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); |
| 292 }; | 282 }; |
| 293 | 283 |
| 294 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 284 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |