| 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> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Gets the blob storage context associated with this context's profile. | 66 // Gets the blob storage context associated with this context's profile. |
| 67 ChromeBlobStorageContext* blob_storage_context() const { | 67 ChromeBlobStorageContext* blob_storage_context() const { |
| 68 return blob_storage_context_.get(); | 68 return blob_storage_context_.get(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Gets the file system host context with this context's profile. | 71 // Gets the file system host context with this context's profile. |
| 72 fileapi::FileSystemContext* file_system_context() const { | 72 fileapi::FileSystemContext* file_system_context() const { |
| 73 return file_system_context_.get(); | 73 return file_system_context_.get(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool is_off_the_record() const { | 76 bool is_incognito() const { |
| 77 return is_off_the_record_; | 77 return is_incognito_; |
| 78 } | 78 } |
| 79 | 79 |
| 80 virtual const std::string& GetUserAgent(const GURL& url) const; | 80 virtual const std::string& GetUserAgent(const GURL& url) const; |
| 81 | 81 |
| 82 HostContentSettingsMap* host_content_settings_map() { | 82 HostContentSettingsMap* host_content_settings_map() { |
| 83 return host_content_settings_map_; | 83 return host_content_settings_map_; |
| 84 } | 84 } |
| 85 | 85 |
| 86 const HostZoomMap* host_zoom_map() const { return host_zoom_map_; } | 86 const HostZoomMap* host_zoom_map() const { return host_zoom_map_; } |
| 87 | 87 |
| 88 const ExtensionInfoMap* extension_info_map() const { | 88 const ExtensionInfoMap* extension_info_map() const { |
| 89 return extension_info_map_; | 89 return extension_info_map_; |
| 90 } | 90 } |
| 91 | 91 |
| 92 prerender::PrerenderManager* prerender_manager() { | 92 prerender::PrerenderManager* prerender_manager() { |
| 93 return prerender_manager_.get(); | 93 return prerender_manager_.get(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 ChromeURLDataManagerBackend* GetChromeURLDataManagerBackend(); | 96 ChromeURLDataManagerBackend* GetChromeURLDataManagerBackend(); |
| 97 | 97 |
| 98 // Setters to simplify initializing from factory objects. | 98 // Setters to simplify initializing from factory objects. |
| 99 void set_chrome_cookie_policy(ChromeCookiePolicy* cookie_policy); | 99 void set_chrome_cookie_policy(ChromeCookiePolicy* cookie_policy); |
| 100 | 100 |
| 101 void set_user_script_dir_path(const FilePath& path) { | 101 void set_user_script_dir_path(const FilePath& path) { |
| 102 user_script_dir_path_ = path; | 102 user_script_dir_path_ = path; |
| 103 } | 103 } |
| 104 void set_is_off_the_record(bool is_off_the_record) { | 104 void set_is_incognito(bool is_incognito) { |
| 105 is_off_the_record_ = is_off_the_record; | 105 is_incognito_ = is_incognito; |
| 106 } | 106 } |
| 107 void set_host_content_settings_map( | 107 void set_host_content_settings_map( |
| 108 HostContentSettingsMap* host_content_settings_map) { | 108 HostContentSettingsMap* host_content_settings_map) { |
| 109 host_content_settings_map_ = host_content_settings_map; | 109 host_content_settings_map_ = host_content_settings_map; |
| 110 } | 110 } |
| 111 void set_host_zoom_map(HostZoomMap* host_zoom_map) { | 111 void set_host_zoom_map(HostZoomMap* host_zoom_map) { |
| 112 host_zoom_map_ = host_zoom_map; | 112 host_zoom_map_ = host_zoom_map; |
| 113 } | 113 } |
| 114 void set_appcache_service(ChromeAppCacheService* service) { | 114 void set_appcache_service(ChromeAppCacheService* service) { |
| 115 appcache_service_ = service; | 115 appcache_service_ = service; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_; | 149 scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_; |
| 150 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 150 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 151 scoped_refptr<HostZoomMap> host_zoom_map_; | 151 scoped_refptr<HostZoomMap> host_zoom_map_; |
| 152 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 152 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 153 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 153 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 154 // TODO(aa): This should use chrome/common/extensions/extension_set.h. | 154 // TODO(aa): This should use chrome/common/extensions/extension_set.h. |
| 155 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 155 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 156 scoped_refptr<prerender::PrerenderManager> prerender_manager_; | 156 scoped_refptr<prerender::PrerenderManager> prerender_manager_; |
| 157 scoped_ptr<ChromeURLDataManagerBackend> chrome_url_data_manager_backend_; | 157 scoped_ptr<ChromeURLDataManagerBackend> chrome_url_data_manager_backend_; |
| 158 | 158 |
| 159 bool is_off_the_record_; | 159 bool is_incognito_; |
| 160 | 160 |
| 161 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext); | 161 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 // A URLRequestContextGetter subclass used by the browser. This returns a | 164 // A URLRequestContextGetter subclass used by the browser. This returns a |
| 165 // subclass of net::URLRequestContext which can be used to store extra | 165 // subclass of net::URLRequestContext which can be used to store extra |
| 166 // information about requests. | 166 // information about requests. |
| 167 // | 167 // |
| 168 // Most methods are expected to be called on the UI thread, except for | 168 // Most methods are expected to be called on the UI thread, except for |
| 169 // the destructor and GetURLRequestContext(). | 169 // the destructor and GetURLRequestContext(). |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext | 263 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext |
| 264 // instance that was lazilly created by GetURLRequestContext. | 264 // instance that was lazilly created by GetURLRequestContext. |
| 265 // Access only from the IO thread. | 265 // Access only from the IO thread. |
| 266 scoped_refptr<net::URLRequestContext> url_request_context_; | 266 scoped_refptr<net::URLRequestContext> url_request_context_; |
| 267 | 267 |
| 268 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); | 268 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); |
| 269 }; | 269 }; |
| 270 | 270 |
| 271 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 271 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |