summaryrefslogtreecommitdiffstats
path: root/content/browser/resource_context.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 07:29:32 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 07:29:32 +0000
commit8093a5439afecec131b78422abdeb7038de6f7a3 (patch)
treea2f7dc196c51970186615d10d0a884e18c2b7ae9 /content/browser/resource_context.cc
parent697a650a1084ef9c77f9c5675f891d6157f36e99 (diff)
downloadchromium_src-8093a5439afecec131b78422abdeb7038de6f7a3.zip
chromium_src-8093a5439afecec131b78422abdeb7038de6f7a3.tar.gz
chromium_src-8093a5439afecec131b78422abdeb7038de6f7a3.tar.bz2
Get rid of the remaining content settings code in the content module.
Add user data to content::ResourceContext that points to chrome's ProfileIOData. That way when the embedder code is called by content, it can get back to its profile specific data structures like HostContentSettingsMap. BUG=76793 Review URL: http://codereview.chromium.org/7014025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85247 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/resource_context.cc')
-rw-r--r--content/browser/resource_context.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/content/browser/resource_context.cc b/content/browser/resource_context.cc
index d167c77..6af4651 100644
--- a/content/browser/resource_context.cc
+++ b/content/browser/resource_context.cc
@@ -22,6 +22,17 @@ ResourceContext::ResourceContext()
ResourceContext::~ResourceContext() {}
+void* ResourceContext::GetUserData(const void* key) const {
+ UserDataMap::const_iterator found = user_data_.find(key);
+ if (found != user_data_.end())
+ return found->second;
+ return NULL;
+}
+
+void ResourceContext::SetUserData(const void* key, void* data) {
+ user_data_[key] = data;
+}
+
net::HostResolver* ResourceContext::host_resolver() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
EnsureInitialized();
@@ -117,18 +128,6 @@ void ResourceContext::set_host_zoom_map(HostZoomMap* host_zoom_map) {
host_zoom_map_ = host_zoom_map;
}
-HostContentSettingsMap* ResourceContext::host_content_settings_map() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- EnsureInitialized();
- return host_content_settings_map_;
-}
-
-void ResourceContext::set_host_content_settings_map(
- HostContentSettingsMap* host_content_settings_map) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- host_content_settings_map_ = host_content_settings_map;
-}
-
const ExtensionInfoMap* ResourceContext::extension_info_map() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
EnsureInitialized();