| 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 f7be09353f288989b952378ab7cbe8118bcb4f08..413119ccacea85141a9f71ad766ee6d5c9e2ae83 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"
|
|
|
| @@ -36,14 +37,27 @@ 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* installed_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>
|
| + GetIsolatedAppRequestContextGetter(
|
| + const Extension* installed_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
|
| @@ -63,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_;
|
| @@ -91,21 +106,33 @@ 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(
|
| + scoped_refptr<ChromeURLRequestContext> main_context,
|
| + const Extension *installed_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(
|
| + scoped_refptr<ChromeURLRequestContext> main_context,
|
| + 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_;
|
|
|