| 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" | 26 #include "webkit/database/database_tracker.h" |
| 27 #include "webkit/fileapi/file_system_context.h" | 27 #include "webkit/fileapi/file_system_context.h" |
| 28 | 28 |
| 29 class ChromeCookiePolicy; | |
| 30 class ChromeURLDataManagerBackend; | 29 class ChromeURLDataManagerBackend; |
| 31 class ChromeURLRequestContextFactory; | 30 class ChromeURLRequestContextFactory; |
| 32 class IOThread; | 31 class IOThread; |
| 33 namespace net { | 32 namespace net { |
| 34 class DnsCertProvenanceChecker; | 33 class DnsCertProvenanceChecker; |
| 35 class NetworkDelegate; | 34 class NetworkDelegate; |
| 36 } | 35 } |
| 37 class PrefService; | 36 class PrefService; |
| 38 class Profile; | 37 class Profile; |
| 39 class ProfileIOData; | 38 class ProfileIOData; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 return extension_info_map_; | 91 return extension_info_map_; |
| 93 } | 92 } |
| 94 | 93 |
| 95 prerender::PrerenderManager* prerender_manager() { | 94 prerender::PrerenderManager* prerender_manager() { |
| 96 return prerender_manager_.get(); | 95 return prerender_manager_.get(); |
| 97 } | 96 } |
| 98 | 97 |
| 99 ChromeURLDataManagerBackend* GetChromeURLDataManagerBackend(); | 98 ChromeURLDataManagerBackend* GetChromeURLDataManagerBackend(); |
| 100 | 99 |
| 101 // Setters to simplify initializing from factory objects. | 100 // Setters to simplify initializing from factory objects. |
| 102 void set_chrome_cookie_policy(ChromeCookiePolicy* cookie_policy); | |
| 103 | |
| 104 void set_user_script_dir_path(const FilePath& path) { | 101 void set_user_script_dir_path(const FilePath& path) { |
| 105 user_script_dir_path_ = path; | 102 user_script_dir_path_ = path; |
| 106 } | 103 } |
| 107 void set_is_incognito(bool is_incognito) { | 104 void set_is_incognito(bool is_incognito) { |
| 108 is_incognito_ = is_incognito; | 105 is_incognito_ = is_incognito; |
| 109 } | 106 } |
| 110 void set_host_content_settings_map( | 107 void set_host_content_settings_map( |
| 111 HostContentSettingsMap* host_content_settings_map) { | 108 HostContentSettingsMap* host_content_settings_map) { |
| 112 host_content_settings_map_ = host_content_settings_map; | 109 host_content_settings_map_ = host_content_settings_map; |
| 113 } | 110 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Important: When adding any new members below, consider whether they need to | 144 // Important: When adding any new members below, consider whether they need to |
| 148 // be added to CopyFrom. | 145 // be added to CopyFrom. |
| 149 // --------------------------------------------------------------------------- | 146 // --------------------------------------------------------------------------- |
| 150 | 147 |
| 151 // Path to the directory user scripts are stored in. | 148 // Path to the directory user scripts are stored in. |
| 152 FilePath user_script_dir_path_; | 149 FilePath user_script_dir_path_; |
| 153 | 150 |
| 154 // TODO(willchan): Make these non-refcounted. | 151 // TODO(willchan): Make these non-refcounted. |
| 155 scoped_refptr<ChromeAppCacheService> appcache_service_; | 152 scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 156 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 153 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
| 157 scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_; | |
| 158 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 154 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 159 scoped_refptr<HostZoomMap> host_zoom_map_; | 155 scoped_refptr<HostZoomMap> host_zoom_map_; |
| 160 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 156 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 161 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 157 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 162 // TODO(aa): This should use chrome/common/extensions/extension_set.h. | 158 // TODO(aa): This should use chrome/common/extensions/extension_set.h. |
| 163 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 159 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 164 scoped_refptr<prerender::PrerenderManager> prerender_manager_; | 160 scoped_refptr<prerender::PrerenderManager> prerender_manager_; |
| 165 scoped_ptr<ChromeURLDataManagerBackend> chrome_url_data_manager_backend_; | 161 scoped_ptr<ChromeURLDataManagerBackend> chrome_url_data_manager_backend_; |
| 166 | 162 |
| 167 bool is_incognito_; | 163 bool is_incognito_; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 285 |
| 290 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext | 286 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext |
| 291 // instance that was lazilly created by GetURLRequestContext. | 287 // instance that was lazilly created by GetURLRequestContext. |
| 292 // Access only from the IO thread. | 288 // Access only from the IO thread. |
| 293 scoped_refptr<net::URLRequestContext> url_request_context_; | 289 scoped_refptr<net::URLRequestContext> url_request_context_; |
| 294 | 290 |
| 295 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); | 291 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); |
| 296 }; | 292 }; |
| 297 | 293 |
| 298 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 294 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |