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

Unified Diff: chrome/browser/profiles/off_the_record_profile_io_data.h

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
Index: chrome/browser/profiles/off_the_record_profile_io_data.h
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.h b/chrome/browser/profiles/off_the_record_profile_io_data.h
index 3a6edf5ad571cae957dceb8d007223c4478c3967..bac5c43ecc85466629b59d8912a5dadb684df212 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.h
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/hash_tables.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/profiles/profile_io_data.h"
@@ -40,8 +41,15 @@ class OffTheRecordProfileIOData : public ProfileIOData {
GetMainRequestContextGetter() const;
scoped_refptr<ChromeURLRequestContextGetter>
GetExtensionsRequestContextGetter() const;
+ scoped_refptr<ChromeURLRequestContextGetter>
+ GetIsolatedAppRequestContextGetter(
+ const std::string& app_id) 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
@@ -59,6 +67,8 @@ class OffTheRecordProfileIOData : public ProfileIOData {
main_request_context_getter_;
mutable scoped_refptr<ChromeURLRequestContextGetter>
extensions_request_context_getter_;
+ mutable ChromeURLRequestContextGetterMap
+ app_request_context_getter_map_;
const scoped_refptr<OffTheRecordProfileIOData> io_data_;
Profile* const profile_;
@@ -79,17 +89,27 @@ class OffTheRecordProfileIOData : public ProfileIOData {
ProfileParams profile_params;
};
+ typedef base::hash_map<std::string, net::HttpTransactionFactory* >
+ HttpTransactionFactoryMap;
+
OffTheRecordProfileIOData();
~OffTheRecordProfileIOData();
// Lazily initializes ProfileIOData.
virtual void LazyInitializeInternal() const;
+ virtual scoped_refptr<RequestContext> InitializeAppRequestContext(
+ scoped_refptr<ChromeURLRequestContext> main_context,
+ const std::string& app_id) 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 std::string& app_id) const;
// Lazy initialization params.
mutable scoped_ptr<LazyParams> lazy_params_;
@@ -105,6 +125,9 @@ class OffTheRecordProfileIOData : public ProfileIOData {
mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_;
mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
+ // One HttpTransactionFactory per isolated app.
+ mutable HttpTransactionFactoryMap app_http_factory_map_;
+
DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileIOData);
};
« no previous file with comments | « chrome/browser/notifications/balloon_host.cc ('k') | chrome/browser/profiles/off_the_record_profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698