Index: chrome/browser/profiles/profile_impl_io_data.h |
diff --git a/chrome/browser/profiles/profile_impl_io_data.h b/chrome/browser/profiles/profile_impl_io_data.h |
index d4fcfc097efbb70d4bd7b78f9222d3b78369c3a5..0e2e7ecc8bff4e679cdc52e97d61bf81c52c9592 100644 |
--- a/chrome/browser/profiles/profile_impl_io_data.h |
+++ b/chrome/browser/profiles/profile_impl_io_data.h |
@@ -7,6 +7,7 @@ |
#pragma once |
#include "base/basictypes.h" |
+#include "base/hash_tables.h" |
#include "base/ref_counted.h" |
#include "chrome/browser/profiles/profile_io_data.h" |
@@ -37,14 +38,26 @@ class ProfileImplIOData : public ProfileIOData { |
int media_cache_max_size, |
const FilePath& extensions_cookie_path); |
+ // Called on-demand for each isolated app. |
+ void InitIsolatedApp(const Extension* app, |
+ const FilePath& cookie_path, |
+ const FilePath& cache_path, |
+ int cache_max_size); |
+ |
scoped_refptr<ChromeURLRequestContextGetter> |
GetMainRequestContextGetter() const; |
scoped_refptr<ChromeURLRequestContextGetter> |
GetMediaRequestContextGetter() const; |
scoped_refptr<ChromeURLRequestContextGetter> |
GetExtensionsRequestContextGetter() const; |
+ scoped_refptr<ChromeURLRequestContextGetter> |
willchan no longer on Chromium
2011/03/02 19:52:17
I think the key will be for you to create a subcla
Charlie Reis
2011/03/03 01:08:05
Thanks for the pointer. I think it's actually sim
|
+ GetIsolatedAppRequestContextGetter(const Extension* app) const; |
private: |
+ typedef base::hash_map<std::string, |
+ scoped_refptr<ChromeURLRequestContextGetter> > |
+ ChromeURLRequestContextGetterMap; |
+ |
// Lazily initialize ProfileParams. We do this on the calls to |
// Get*RequestContextGetter(), so we only initialize ProfileParams right |
// before posting a task to the IO thread to start using them. This prevents |
@@ -64,6 +77,7 @@ class ProfileImplIOData : public ProfileIOData { |
media_request_context_getter_; |
mutable scoped_refptr<ChromeURLRequestContextGetter> |
extensions_request_context_getter_; |
+ mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_; |
const scoped_refptr<ProfileImplIOData> io_data_; |
Profile* const profile_; |
@@ -92,21 +106,31 @@ class ProfileImplIOData : public ProfileIOData { |
ProfileParams profile_params; |
}; |
+ typedef base::hash_map<std::string, LazyParams*> LazyParamsMap; |
+ |
ProfileImplIOData(); |
virtual ~ProfileImplIOData(); |
// Lazily initializes ProfileImplIOData. |
virtual void LazyInitializeInternal() const; |
+ virtual scoped_refptr<RequestContext> |
+ InitializeAppRequestContext(const Extension *app) const; |
virtual scoped_refptr<ChromeURLRequestContext> |
AcquireMainRequestContext() const; |
virtual scoped_refptr<ChromeURLRequestContext> |
AcquireMediaRequestContext() const; |
virtual scoped_refptr<ChromeURLRequestContext> |
AcquireExtensionsRequestContext() const; |
+ virtual scoped_refptr<ChromeURLRequestContext> |
+ AcquireIsolatedAppRequestContext( |
+ const Extension* installed_app) const; |
// Lazy initialization params. |
mutable scoped_ptr<LazyParams> lazy_params_; |
+ // One LazyParams per isolated app. |
+ mutable LazyParamsMap lazy_params_map_; |
+ |
mutable scoped_refptr<RequestContext> main_request_context_; |
mutable scoped_refptr<RequestContext> media_request_context_; |
mutable scoped_refptr<RequestContext> extensions_request_context_; |