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

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

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor to use ContentBrowserClient. 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
Index: chrome/browser/profiles/profile.cc
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index b56e449797e4a5dfeac7cfe579289ce36877b93b..1d605968f249586904fe4324ab8e1d8cbc84d007 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -35,6 +35,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/extension.h"
#include "chrome/common/json_pref_store.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
@@ -419,6 +420,17 @@ class OffTheRecordProfileImpl : public Profile,
return io_data_.GetMainRequestContextGetter();
}
+ virtual URLRequestContextGetter* 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();
+ }
+
virtual URLRequestContextGetter* GetRequestContextForMedia() {
// In OTR mode, media request context is the same as the original one.
return io_data_.GetMainRequestContextGetter();
@@ -428,6 +440,11 @@ class OffTheRecordProfileImpl : public Profile,
return io_data_.GetExtensionsRequestContextGetter();
}
+ URLRequestContextGetter* GetRequestContextForIsolatedApp(
+ std::string app_id) {
+ return io_data_.GetIsolatedAppRequestContextGetter(app_id);
+ }
+
virtual net::SSLConfigService* GetSSLConfigService() {
return profile_->GetSSLConfigService();
}

Powered by Google App Engine
This is Rietveld 408576698