diff options
author | creis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 22:45:09 +0000 |
---|---|---|
committer | creis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 22:45:09 +0000 |
commit | d969667a1e558d2ba53e556233598cdc75d24678 (patch) | |
tree | 5b848ba7627e1240c0ef2855bf5780db83a027b7 /chrome/browser/net/chrome_url_request_context.h | |
parent | 71e2f0a1ba62594c2cb555dd291810aaa7775779 (diff) | |
download | chromium_src-d969667a1e558d2ba53e556233598cdc75d24678.zip chromium_src-d969667a1e558d2ba53e556233598cdc75d24678.tar.gz chromium_src-d969667a1e558d2ba53e556233598cdc75d24678.tar.bz2 |
Initial support for partitioning cookies for isolated apps.
This CL adds experimental support for letting installed apps request isolated
storage in their manifest. An isolated app will have its own cookie store
that is not shared with other apps or normal pages, even if they share an
origin. The feature is currently behind a --enable-experimental-app-manifests
flag.
BUG=69335
TEST=ExtensionManifestTest.IsolatedApps
TEST=IsolatedAppApiTest.CookieIsolation*
Review URL: http://codereview.chromium.org/6201005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/chrome_url_request_context.h')
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index fab3f71..b8a87d2 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -47,6 +47,9 @@ class ChromeURLRequestContext : public net::URLRequestContext { public: ChromeURLRequestContext(); + // Copies the state from |other| into this context. + void CopyFrom(ChromeURLRequestContext* other); + // Gets the path to the directory user scripts are stored in. FilePath user_script_dir_path() const { return user_script_dir_path_; @@ -140,6 +143,11 @@ class ChromeURLRequestContext : public net::URLRequestContext { virtual ~ChromeURLRequestContext(); private: + // --------------------------------------------------------------------------- + // Important: When adding any new members below, consider whether they need to + // be added to CopyFrom. + // --------------------------------------------------------------------------- + // Path to the directory user scripts are stored in. FilePath user_script_dir_path_; @@ -158,6 +166,11 @@ class ChromeURLRequestContext : public net::URLRequestContext { bool is_incognito_; + // --------------------------------------------------------------------------- + // Important: When adding any new members above, consider whether they need to + // be added to CopyFrom. + // --------------------------------------------------------------------------- + DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext); }; @@ -213,6 +226,13 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, static ChromeURLRequestContextGetter* CreateOriginalForExtensions( Profile* profile, const ProfileIOData* profile_io_data); + // Create an instance for an original profile for an app with isolated + // storage. This is expected to get called on UI thread. + static ChromeURLRequestContextGetter* CreateOriginalForIsolatedApp( + Profile* profile, + const ProfileIOData* profile_io_data, + const std::string& app_id); + // Create an instance for use with an OTR profile. This is expected to get // called on the UI thread. static ChromeURLRequestContextGetter* CreateOffTheRecord( @@ -223,6 +243,13 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, static ChromeURLRequestContextGetter* CreateOffTheRecordForExtensions( Profile* profile, const ProfileIOData* profile_io_data); + // Create an instance for an OTR profile for an app with isolated storage. + // This is expected to get called on UI thread. + static ChromeURLRequestContextGetter* CreateOffTheRecordForIsolatedApp( + Profile* profile, + const ProfileIOData* profile_io_data, + const std::string& app_id); + // Clean up UI thread resources. This is expected to get called on the UI // thread before the instance is deleted on the IO thread. void CleanupOnUIThread(); |