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

Unified Diff: chrome/browser/profiles/profile_impl_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: 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_impl_io_data.h
diff --git a/chrome/browser/profiles/profile_impl_io_data.h b/chrome/browser/profiles/profile_impl_io_data.h
index f7be09353f288989b952378ab7cbe8118bcb4f08..49f13166d3f38fc3e6a0cc613f842e00771afbca 100644
--- a/chrome/browser/profiles/profile_impl_io_data.h
+++ b/chrome/browser/profiles/profile_impl_io_data.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/ref_counted.h"
#include "chrome/browser/profiles/profile_io_data.h"
@@ -34,7 +35,8 @@ class ProfileImplIOData : public ProfileIOData {
int cache_max_size,
const FilePath& media_cache_path,
int media_cache_max_size,
- const FilePath& extensions_cookie_path);
+ const FilePath& extensions_cookie_path,
+ const FilePath& app_path);
scoped_refptr<ChromeURLRequestContextGetter>
GetMainRequestContextGetter() const;
@@ -42,8 +44,15 @@ class ProfileImplIOData : public ProfileIOData {
GetMediaRequestContextGetter() const;
scoped_refptr<ChromeURLRequestContextGetter>
GetExtensionsRequestContextGetter() const;
+ scoped_refptr<ChromeURLRequestContextGetter>
+ GetIsolatedAppRequestContextGetter(
+ 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
@@ -63,6 +72,7 @@ class ProfileImplIOData : public ProfileIOData {
media_request_context_getter_;
mutable scoped_refptr<ChromeURLRequestContextGetter>
extensions_request_context_getter_;
+ mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_;
const scoped_refptr<ProfileImplIOData> io_data_;
Profile* const profile_;
@@ -91,17 +101,27 @@ class ProfileImplIOData : public ProfileIOData {
ProfileParams profile_params;
};
+ typedef base::hash_map<std::string, net::HttpTransactionFactory* >
+ HttpTransactionFactoryMap;
+
ProfileImplIOData();
virtual ~ProfileImplIOData();
// Lazily initializes ProfileImplIOData.
virtual void LazyInitializeInternal() const;
+ virtual scoped_refptr<RequestContext> InitializeAppRequestContext(
+ scoped_refptr<ChromeURLRequestContext> main_context,
+ 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,
+ std::string app_id) const;
// Lazy initialization params.
mutable scoped_ptr<LazyParams> lazy_params_;
@@ -115,6 +135,13 @@ class ProfileImplIOData : public ProfileIOData {
mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
mutable scoped_ptr<net::HttpTransactionFactory> media_http_factory_;
+ // One HttpTransactionFactory per isolated app.
+ mutable HttpTransactionFactoryMap app_http_factory_map_;
+
+ // Parameters needed for isolated apps.
+ FilePath app_path_;
+ bool clear_local_state_on_exit_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
};

Powered by Google App Engine
This is Rietveld 408576698