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

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 automation_util and thread issue. 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..c7a65ac7b171a3f54ca7bc224ae3514080579bff 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.h
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.h
@@ -8,12 +8,14 @@
#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"
class ChromeURLRequestContext;
class ChromeURLRequestContextGetter;
+class Extension;
class IOThread;
class Profile;
@@ -40,8 +42,15 @@ class OffTheRecordProfileIOData : public ProfileIOData {
GetMainRequestContextGetter() 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
@@ -59,6 +68,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 +90,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 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_;
@@ -105,6 +126,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);
};

Powered by Google App Engine
This is Rietveld 408576698