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

Unified Diff: chrome/browser/ssl/chrome_ssl_host_state_delegate.cc

Issue 1312453005: Removed Profile::GetHostContentSettingsMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed patch conflict Created 5 years, 3 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
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
diff --git a/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc b/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
index ec225d3f6043d996481514a631980ae183dbfd78..9de74c8570d51bddc30bcef03a7a3c15d222aa3c 100644
--- a/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
+++ b/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
@@ -17,6 +17,7 @@
#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "base/values.h"
+#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
@@ -236,7 +237,8 @@ void ChromeSSLHostStateDelegate::AllowCert(const std::string& host,
GURL url = GetSecureGURLForHost(host);
const ContentSettingsPattern pattern =
ContentSettingsPattern::FromURLNoWildcard(url);
- HostContentSettingsMap* map = profile_->GetHostContentSettingsMap();
+ HostContentSettingsMap* map =
+ HostContentSettingsMapFactory::GetForProfile(profile_);
scoped_ptr<base::Value> value(map->GetWebsiteSetting(
url, url, CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, std::string(), NULL));
@@ -270,8 +272,8 @@ void ChromeSSLHostStateDelegate::AllowCert(const std::string& host,
}
void ChromeSSLHostStateDelegate::Clear() {
- profile_->GetHostContentSettingsMap()->ClearSettingsForOneType(
- CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS);
+ HostContentSettingsMapFactory::GetForProfile(profile_)
+ ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS);
}
content::SSLHostStateDelegate::CertJudgment
@@ -279,7 +281,8 @@ ChromeSSLHostStateDelegate::QueryPolicy(const std::string& host,
const net::X509Certificate& cert,
net::CertStatus error,
bool* expired_previous_decision) {
- HostContentSettingsMap* map = profile_->GetHostContentSettingsMap();
+ HostContentSettingsMap* map =
+ HostContentSettingsMapFactory::GetForProfile(profile_);
GURL url = GetSecureGURLForHost(host);
scoped_ptr<base::Value> value(map->GetWebsiteSetting(
url, url, CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, std::string(), NULL));
@@ -330,7 +333,8 @@ void ChromeSSLHostStateDelegate::RevokeUserAllowExceptions(
GURL url = GetSecureGURLForHost(host);
const ContentSettingsPattern pattern =
ContentSettingsPattern::FromURLNoWildcard(url);
- HostContentSettingsMap* map = profile_->GetHostContentSettingsMap();
+ HostContentSettingsMap* map =
+ HostContentSettingsMapFactory::GetForProfile(profile_);
map->SetWebsiteSetting(pattern,
pattern,
@@ -369,7 +373,8 @@ bool ChromeSSLHostStateDelegate::HasAllowException(
GURL url = GetSecureGURLForHost(host);
const ContentSettingsPattern pattern =
ContentSettingsPattern::FromURLNoWildcard(url);
- HostContentSettingsMap* map = profile_->GetHostContentSettingsMap();
+ HostContentSettingsMap* map =
+ HostContentSettingsMapFactory::GetForProfile(profile_);
scoped_ptr<base::Value> value(map->GetWebsiteSetting(
url, url, CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, std::string(), NULL));
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698