Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 22e3911ff890380575f3a058670c883ba2d9f6bf..363943b4acb81005bbe6f5ad19f32a4e8242dbe1 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -340,10 +340,13 @@ ProfileImpl::ProfileImpl(const FilePath& path) |
extensions_cookie_path = |
extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); |
+ FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); |
+ |
// Make sure we initialize the ProfileIOData after everything else has been |
// initialized that we might be reading from the IO thread. |
io_data_.Init(cookie_path, cache_path, cache_max_size, |
- media_cache_path, media_cache_max_size, extensions_cookie_path); |
+ media_cache_path, media_cache_max_size, extensions_cookie_path, |
+ app_path); |
// Initialize the ProfilePolicyConnector after |io_data_| since it requires |
// the URLRequestContextGetter to be initialized. |
@@ -816,6 +819,17 @@ URLRequestContextGetter* ProfileImpl::GetRequestContext() { |
return request_context; |
} |
+URLRequestContextGetter* ProfileImpl::GetRequestContextForPossibleApp( |
+ const Extension* installed_app) { |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableExperimentalAppManifests) && |
+ installed_app != NULL && |
+ installed_app->is_storage_isolated()) |
+ return GetRequestContextForIsolatedApp(installed_app); |
+ |
+ return GetRequestContext(); |
+} |
+ |
URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { |
return io_data_.GetMediaRequestContextGetter(); |
} |
@@ -833,6 +847,11 @@ URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { |
return io_data_.GetExtensionsRequestContextGetter(); |
} |
+URLRequestContextGetter* ProfileImpl::GetRequestContextForIsolatedApp( |
+ const Extension* installed_app) { |
+ return io_data_.GetIsolatedAppRequestContextGetter(installed_app); |
+} |
+ |
void ProfileImpl::RegisterExtensionWithRequestContexts( |
const Extension* extension) { |
// AddRef to ensure the data lives until the other thread gets it. Balanced in |