Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2741)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index d6ea416ea3fb074265d2e60754fcdcb8f043c45c..d76a30b79b795f0b6f34b8efb66814e89f2e991e 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -342,10 +342,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.
@@ -822,6 +825,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->id());
+
+ return GetRequestContext();
+}
+
URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() {
return io_data_.GetMediaRequestContextGetter();
}
@@ -839,6 +853,11 @@ URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
return io_data_.GetExtensionsRequestContextGetter();
}
+URLRequestContextGetter* ProfileImpl::GetRequestContextForIsolatedApp(
+ const std::string& app_id) {
+ return io_data_.GetIsolatedAppRequestContextGetter(app_id);
+}
+
void ProfileImpl::RegisterExtensionWithRequestContexts(
const Extension* extension) {
BrowserThread::PostTask(
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698