summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 01:17:54 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 01:17:54 +0000
commit7a12518454d36fb4ac79431f56106b38cd2482ab (patch)
treeff2fa2bc8761460b9345e0d9c9a1def5a8e5f663 /chrome/browser/net
parent779c33638f4b10def2d103f4703fa5bf58899aec (diff)
downloadchromium_src-7a12518454d36fb4ac79431f56106b38cd2482ab.zip
chromium_src-7a12518454d36fb4ac79431f56106b38cd2482ab.tar.gz
chromium_src-7a12518454d36fb4ac79431f56106b38cd2482ab.tar.bz2
Make the Blacklist in the URL request context refcounted, since the Profile gets destroyed before the IO thread.
Also some other random misc. cleanup. TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/554140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc7
-rw-r--r--chrome/browser/net/chrome_url_request_context.h11
2 files changed, 7 insertions, 11 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 4e9b0ec..7963742 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -740,7 +740,7 @@ bool ChromeURLRequestContext::InterceptCookie(
}
const Blacklist* ChromeURLRequestContext::GetPrivacyBlacklist() const {
- return privacy_blacklist_;
+ return privacy_blacklist_.get();
}
void ChromeURLRequestContext::OnNewExtensions(const std::string& id,
@@ -786,11 +786,6 @@ ChromeURLRequestContext::ChromeURLRequestContext(
is_off_the_record_ = other->is_off_the_record_;
}
-void ChromeURLRequestContext::set_privacy_blacklist(
- const Blacklist* privacy_blacklist) {
- privacy_blacklist_ = privacy_blacklist;
-}
-
void ChromeURLRequestContext::OnAcceptLanguageChange(
const std::string& accept_language) {
CheckCurrentlyOnIOThread();
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index f3d1a14..7c60a56 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -9,6 +9,7 @@
#include "base/linked_ptr.h"
#include "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/host_zoom_map.h"
+#include "chrome/browser/privacy_blacklist/blacklist.h"
#include "chrome/browser/net/url_request_context_getter.h"
#include "chrome/common/appcache/chrome_appcache_service.h"
#include "chrome/common/extensions/extension.h"
@@ -16,7 +17,6 @@
#include "chrome/common/pref_service.h"
#include "net/url_request/url_request_context.h"
-class Blacklist;
class CommandLine;
class Profile;
@@ -182,7 +182,9 @@ class ChromeURLRequestContext : public URLRequestContext {
void set_host_zoom_map(HostZoomMap* host_zoom_map) {
host_zoom_map_ = host_zoom_map;
}
- void set_privacy_blacklist(const Blacklist* privacy_blacklist);
+ void set_privacy_blacklist(Blacklist* privacy_blacklist) {
+ privacy_blacklist_ = privacy_blacklist;
+ }
void set_appcache_service(ChromeAppCacheService* service) {
appcache_service_ = service;
}
@@ -205,8 +207,7 @@ class ChromeURLRequestContext : public URLRequestContext {
scoped_refptr<ChromeAppCacheService> appcache_service_;
HostContentSettingsMap* host_content_settings_map_;
scoped_refptr<HostZoomMap> host_zoom_map_;
-
- const Blacklist* privacy_blacklist_;
+ scoped_refptr<Blacklist> privacy_blacklist_;
bool is_media_;
bool is_off_the_record_;
@@ -376,7 +377,7 @@ class ChromeURLRequestContextFactory {
FilePath user_script_dir_path_;
HostContentSettingsMap* host_content_settings_map_;
scoped_refptr<HostZoomMap> host_zoom_map_;
- const Blacklist* privacy_blacklist_;
+ scoped_refptr<Blacklist> privacy_blacklist_;
net::TransportSecurityState* transport_security_state_;
scoped_refptr<net::SSLConfigService> ssl_config_service_;