summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-29 19:49:45 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-29 19:49:45 +0000
commite284e6d8f6079a7cfc8eb70f010cf2378253fb18 (patch)
tree9cd71a6abb4d08b700e477f7e779cc978a39717d /chrome/browser/net
parenteb6b623883f7956e10bdf1f1749257f91b2d75a7 (diff)
downloadchromium_src-e284e6d8f6079a7cfc8eb70f010cf2378253fb18.zip
chromium_src-e284e6d8f6079a7cfc8eb70f010cf2378253fb18.tar.gz
chromium_src-e284e6d8f6079a7cfc8eb70f010cf2378253fb18.tar.bz2
Reland r37508. Implement HostContentSettingsMap.
BUG=none TEST=none Review URL: http://codereview.chromium.org/555172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc6
-rw-r--r--chrome/browser/net/chrome_url_request_context.h13
2 files changed, 17 insertions, 2 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 9e5286a..a50013d 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -779,6 +779,7 @@ ChromeURLRequestContext::ChromeURLRequestContext(
extension_info_ = other->extension_info_;
user_script_dir_path_ = other->user_script_dir_path_;
appcache_service_ = other->appcache_service_;
+ host_content_settings_map_ = other->host_content_settings_map_;
host_zoom_map_ = other->host_zoom_map_;
privacy_blacklist_ = other->privacy_blacklist_;
is_media_ = other->is_media_;
@@ -857,6 +858,8 @@ ChromeURLRequestContextFactory::ChromeURLRequestContextFactory(Profile* profile)
cookie_policy_type_ = net::CookiePolicy::FromInt(
prefs->GetInteger(prefs::kCookieBehavior));
+ host_content_settings_map_ = profile->GetHostContentSettingsMap();
+
host_zoom_map_ = profile->GetHostZoomMap();
privacy_blacklist_ = profile->GetPrivacyBlacklist();
@@ -903,6 +906,7 @@ void ChromeURLRequestContextFactory::ApplyProfileParametersToContext(
context->set_cookie_policy_type(cookie_policy_type_);
context->set_extension_info(extension_info_);
context->set_user_script_dir_path(user_script_dir_path_);
+ context->set_host_content_settings_map(host_content_settings_map_);
context->set_host_zoom_map(host_zoom_map_);
context->set_privacy_blacklist(privacy_blacklist_);
context->set_transport_security_state(
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index 3a3c1bb..d1953ef 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,6 +7,7 @@
#include "base/file_path.h"
#include "base/linked_ptr.h"
+#include "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/host_zoom_map.h"
#include "chrome/browser/net/url_request_context_getter.h"
#include "chrome/common/appcache/chrome_appcache_service.h"
@@ -98,6 +99,10 @@ class ChromeURLRequestContext : public URLRequestContext {
virtual bool InterceptResponseCookie(const URLRequest* request,
const std::string& cookie) const;
+ const HostContentSettingsMap* host_content_settings_map() const {
+ return host_content_settings_map_;
+ }
+
const HostZoomMap* host_zoom_map() const { return host_zoom_map_; }
// Gets the Privacy Blacklist, if any for this context.
@@ -169,6 +174,10 @@ class ChromeURLRequestContext : public URLRequestContext {
void set_is_media(bool is_media) {
is_media_ = is_media;
}
+ void set_host_content_settings_map(
+ HostContentSettingsMap* host_content_settings_map) {
+ host_content_settings_map_ = host_content_settings_map;
+ }
void set_host_zoom_map(HostZoomMap* host_zoom_map) {
host_zoom_map_ = host_zoom_map;
}
@@ -193,6 +202,7 @@ class ChromeURLRequestContext : public URLRequestContext {
FilePath user_script_dir_path_;
scoped_refptr<ChromeAppCacheService> appcache_service_;
+ HostContentSettingsMap* host_content_settings_map_;
scoped_refptr<HostZoomMap> host_zoom_map_;
const Blacklist* privacy_blacklist_;
@@ -363,6 +373,7 @@ class ChromeURLRequestContextFactory {
// TODO(aa): I think this can go away now as we no longer support standalone
// user scripts.
FilePath user_script_dir_path_;
+ HostContentSettingsMap* host_content_settings_map_;
scoped_refptr<HostZoomMap> host_zoom_map_;
const Blacklist* privacy_blacklist_;
net::TransportSecurityState* transport_security_state_;