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

Unified Diff: chrome/browser/net/chrome_url_request_context.h

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ChromeURLRequestContext::Copy. Created 9 years, 10 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/net/chrome_url_request_context.h
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index 76340771e566a08d83e952ca6f8de2848227a0a2..e030891167d7fdb75eba79ce78cccc56c3202f91 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -17,11 +17,13 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prerender/prerender_manager.h"
+#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_icon_set.h"
#include "chrome/common/net/url_request_context_getter.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/chrome_blob_storage_context.h"
#include "content/browser/host_zoom_map.h"
+#include "net/base/cookie_monster.h"
#include "net/base/cookie_policy.h"
#include "net/url_request/url_request_context.h"
#include "webkit/database/database_tracker.h"
@@ -48,6 +50,9 @@ class ChromeURLRequestContext : public net::URLRequestContext {
public:
ChromeURLRequestContext();
+ // Copies the state from this context into |out|.
+ void Copy(ChromeURLRequestContext* out);
+
// Gets the path to the directory user scripts are stored in.
FilePath user_script_dir_path() const {
return user_script_dir_path_;
@@ -98,11 +103,19 @@ class ChromeURLRequestContext : public net::URLRequestContext {
return protocol_handler_registry_.get();
}
+ net::CookieMonster::Delegate* cookie_delegate() {
willchan no longer on Chromium 2011/03/03 18:16:59 Can you remove this? Let's figure out some other w
Charlie Reis 2011/03/04 22:34:53 Done.
+ return cookie_delegate_.get();
+ }
+
ChromeURLDataManagerBackend* GetChromeURLDataManagerBackend();
// Setters to simplify initializing from factory objects.
void set_chrome_cookie_policy(ChromeCookiePolicy* cookie_policy);
+ void set_cookie_delegate(net::CookieMonster::Delegate* cookie_delegate) {
+ cookie_delegate_ = cookie_delegate;
+ }
+
void set_user_script_dir_path(const FilePath& path) {
user_script_dir_path_ = path;
}
@@ -155,6 +168,7 @@ class ChromeURLRequestContext : public net::URLRequestContext {
scoped_refptr<ChromeAppCacheService> appcache_service_;
scoped_refptr<webkit_database::DatabaseTracker> database_tracker_;
scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_;
+ scoped_refptr<net::CookieMonster::Delegate> cookie_delegate_;
scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
scoped_refptr<HostZoomMap> host_zoom_map_;
scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
@@ -222,6 +236,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 Extension* installed_app);
+
// Create an instance for use with an OTR profile. This is expected to get
// called on the UI thread.
static ChromeURLRequestContextGetter* CreateOffTheRecord(
@@ -232,6 +253,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 Extension* installed_app);
+
// 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();

Powered by Google App Engine
This is Rietveld 408576698