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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // get called on UI thread. This method takes a profile and reuses the | 248 // get called on UI thread. This method takes a profile and reuses the |
249 // 'original' net::URLRequestContext for common files. | 249 // 'original' net::URLRequestContext for common files. |
250 static ChromeURLRequestContextGetter* CreateOriginalForMedia( | 250 static ChromeURLRequestContextGetter* CreateOriginalForMedia( |
251 Profile* profile, const FilePath& disk_cache_path, int cache_size); | 251 Profile* profile, const FilePath& disk_cache_path, int cache_size); |
252 | 252 |
253 // Create an instance for an original profile for extensions. This is expected | 253 // Create an instance for an original profile for extensions. This is expected |
254 // to get called on UI thread. | 254 // to get called on UI thread. |
255 static ChromeURLRequestContextGetter* CreateOriginalForExtensions( | 255 static ChromeURLRequestContextGetter* CreateOriginalForExtensions( |
256 Profile* profile, const FilePath& cookie_store_path); | 256 Profile* profile, const FilePath& cookie_store_path); |
257 | 257 |
| 258 // Create an instance for an original profile for an app with isolated |
| 259 // storage. This is expected to get called on UI thread. |
| 260 static ChromeURLRequestContextGetter* CreateOriginalForIsolatedApp( |
| 261 Profile* profile, const Extension* app, |
| 262 const FilePath& cookie_store_path); |
| 263 |
258 // Create an instance for use with an OTR profile. This is expected to get | 264 // Create an instance for use with an OTR profile. This is expected to get |
259 // called on the UI thread. | 265 // called on the UI thread. |
260 static ChromeURLRequestContextGetter* CreateOffTheRecord(Profile* profile); | 266 static ChromeURLRequestContextGetter* CreateOffTheRecord(Profile* profile); |
261 | 267 |
262 // Create an instance for an OTR profile for extensions. This is expected | 268 // Create an instance for an OTR profile for extensions. This is expected |
263 // to get called on UI thread. | 269 // to get called on UI thread. |
264 static ChromeURLRequestContextGetter* CreateOffTheRecordForExtensions( | 270 static ChromeURLRequestContextGetter* CreateOffTheRecordForExtensions( |
265 Profile* profile); | 271 Profile* profile); |
266 | 272 |
| 273 // Create an instance for an OTR profile for an app with isolated storage. |
| 274 // This is expected to get called on UI thread. |
| 275 static ChromeURLRequestContextGetter* CreateOffTheRecordForIsolatedApp( |
| 276 Profile* profile, const Extension* app); |
| 277 |
267 // Clean up UI thread resources. This is expected to get called on the UI | 278 // Clean up UI thread resources. This is expected to get called on the UI |
268 // thread before the instance is deleted on the IO thread. | 279 // thread before the instance is deleted on the IO thread. |
269 void CleanupOnUIThread(); | 280 void CleanupOnUIThread(); |
270 | 281 |
271 // NotificationObserver implementation. | 282 // NotificationObserver implementation. |
272 virtual void Observe(NotificationType type, | 283 virtual void Observe(NotificationType type, |
273 const NotificationSource& source, | 284 const NotificationSource& source, |
274 const NotificationDetails& details); | 285 const NotificationDetails& details); |
275 | 286 |
276 private: | 287 private: |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 379 |
369 FilePath profile_dir_path_; | 380 FilePath profile_dir_path_; |
370 | 381 |
371 private: | 382 private: |
372 IOThread* const io_thread_; | 383 IOThread* const io_thread_; |
373 | 384 |
374 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); | 385 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); |
375 }; | 386 }; |
376 | 387 |
377 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 388 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |