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

Unified Diff: chrome/browser/tab_contents/tab_contents_ssl_helper.cc

Issue 8356010: Merge 106270 - Check for default content settings when requiring user authorization for plug-ins. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src
Patch Set: fix Created 9 years, 2 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
Index: chrome/browser/tab_contents/tab_contents_ssl_helper.cc
diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
index b8cae38119ee9bd382e36fa937ee82c4d6cff71f..d9fcdf643e545acec7a0cac50f3a872e0f2bc616 100644
--- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
+++ b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
@@ -213,25 +213,29 @@ void TabContentsSSLHelper::SelectClientCertificate(
HostContentSettingsMap* map =
tab_contents_->profile()->GetHostContentSettingsMap();
scoped_ptr<Value> filter(map->GetContentSettingValue(
- requesting_url,
- requesting_url,
+ requesting_url, requesting_url,
CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
- std::string()));
+ std::string(),
+ NULL, NULL));
scoped_refptr<net::X509Certificate> selected_cert;
if (filter.get()) {
// Try to automatically select a client certificate.
- DCHECK(filter->IsType(Value::TYPE_DICTIONARY));
- DictionaryValue* filter_dict = static_cast<DictionaryValue*>(filter.get());
-
- const std::vector<scoped_refptr<net::X509Certificate> >& all_client_certs =
- cert_request_info->client_certs;
- for (size_t i = 0; i < all_client_certs.size(); ++i) {
- if (CertMatchesFilter(*all_client_certs[i], *filter_dict)) {
- selected_cert = all_client_certs[i];
- // Use the first certificate that is matched by the filter.
- break;
+ if (filter->IsType(Value::TYPE_DICTIONARY)) {
+ DictionaryValue* filter_dict =
+ static_cast<DictionaryValue*>(filter.get());
+
+ const std::vector<scoped_refptr<net::X509Certificate> >&
+ all_client_certs = cert_request_info->client_certs;
+ for (size_t i = 0; i < all_client_certs.size(); ++i) {
+ if (CertMatchesFilter(*all_client_certs[i], *filter_dict)) {
+ selected_cert = all_client_certs[i];
+ // Use the first certificate that is matched by the filter.
+ break;
+ }
}
+ } else {
+ NOTREACHED();
}
}
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.cc ('k') | chrome/common/content_settings_pattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698