summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles/profile_io_data.h
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 14:39:08 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 14:39:08 +0000
commit33ad6ce948e24e01ec1634af63001dda4ac0506a (patch)
tree71daec231014a7b05e1a213e2ac0a9a41f4ca52a /chrome/browser/profiles/profile_io_data.h
parentd0a60eea5c90a5b594604c91654859a493e1b5cb (diff)
downloadchromium_src-33ad6ce948e24e01ec1634af63001dda4ac0506a.zip
chromium_src-33ad6ce948e24e01ec1634af63001dda4ac0506a.tar.gz
chromium_src-33ad6ce948e24e01ec1634af63001dda4ac0506a.tar.bz2
Revert 219709 "Remove the Extensions URLRequestContext."
Reverted due to crashes under memory tools. BUG=280138 > Remove the Extensions URLRequestContext. > > Though chrome-extension: scheme URLs support cookies, they do not share > a namespace with http: and https:. In particular, chrome-extension://a and > http://a should not have the same set of cookies. > > To enforce this, previously the code created a completely separate > URLRequestContext for servicing chrome-extension: schemes. However, > the code really only used this object as a method for conveying the > correct cookie jar from Profile creation to a few spots where cookies > were accessed; the rest of the URLRequestContext functionality was unused. > > This CL removes the Extensions URLRequestContext code and replaces it > with APIs that directly expose the needed net::CookieStore. > > Lastly, CookieMonster::EnableFileScheme() is removed and > CookieMonster::Delegate is renamed CookieMonsterDelegate. > > EnableFileScheme is an inherently racy API because > CookieMonsters are creatable on all threads and this > function sets an unprotected global flag. CookieMonsterDelegate > is preferable to the nested interface because it can now be > forward declared. > > TBRing darin and sky to cover the rest of the mechanical unittest changes. > > TBR=darin,sky > BUG=158386,159193,57884 > > Review URL: https://chromiumcodereview.appspot.com/12546016 TBR=ajwong@chromium.org Review URL: https://codereview.chromium.org/23551005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles/profile_io_data.h')
-rw-r--r--chrome/browser/profiles/profile_io_data.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
index d4e9a61..724a728 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -99,6 +99,7 @@ class ProfileIOData {
ChromeURLRequestContext* GetMainRequestContext() const;
ChromeURLRequestContext* GetMediaRequestContext() const;
+ ChromeURLRequestContext* GetExtensionsRequestContext() const;
ChromeURLRequestContext* GetIsolatedAppRequestContext(
ChromeURLRequestContext* main_context,
const StoragePartitionDescriptor& partition_descriptor,
@@ -152,6 +153,10 @@ class ProfileIOData {
return &one_click_signin_rejected_email_list_;
}
+ ChromeURLRequestContext* extensions_request_context() const {
+ return extensions_request_context_.get();
+ }
+
BooleanPrefMember* safe_browsing_enabled() const {
return &safe_browsing_enabled_;
}
@@ -220,6 +225,7 @@ class ProfileIOData {
explicit AppRequestContext(
chrome_browser_net::LoadTimeStats* load_time_stats);
+ void SetCookieStore(net::CookieStore* cookie_store);
void SetHttpTransactionFactory(
scoped_ptr<net::HttpTransactionFactory> http_factory);
void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory);
@@ -227,6 +233,7 @@ class ProfileIOData {
private:
virtual ~AppRequestContext();
+ scoped_refptr<net::CookieStore> cookie_store_;
scoped_ptr<net::HttpTransactionFactory> http_factory_;
scoped_ptr<net::URLRequestJobFactory> job_factory_;
};
@@ -242,6 +249,7 @@ class ProfileIOData {
scoped_refptr<CookieSettings> cookie_settings;
scoped_refptr<HostContentSettingsMap> host_content_settings_map;
scoped_refptr<net::SSLConfigService> ssl_config_service;
+ scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate;
scoped_refptr<ExtensionInfoMap> extension_info_map;
scoped_ptr<chrome_browser_net::ResourcePrefetchPredictorObserver>
resource_prefetch_predictor_observer_;
@@ -384,6 +392,9 @@ class ProfileIOData {
ProfileParams* profile_params,
content::ProtocolHandlerMap* protocol_handlers) const = 0;
+ // Initializes the RequestContext for extensions.
+ virtual void InitializeExtensionsRequestContext(
+ ProfileParams* profile_params) const = 0;
// Does an on-demand initialization of a RequestContext for the given
// isolated app.
virtual ChromeURLRequestContext* InitializeAppRequestContext(
@@ -499,6 +510,7 @@ class ProfileIOData {
// These are only valid in between LazyInitialize() and their accessor being
// called.
mutable scoped_ptr<ChromeURLRequestContext> main_request_context_;
+ mutable scoped_ptr<ChromeURLRequestContext> extensions_request_context_;
// One URLRequestContext per isolated app for main and media requests.
mutable URLRequestContextMap app_request_context_map_;
mutable URLRequestContextMap isolated_media_request_context_map_;