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

Side by Side Diff: chrome/browser/ssl/ssl_host_state.cc

Issue 20296: Remember that we've white listed a certificate when we switch to a new tab.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
OLDNEW
(Empty)
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ssl/ssl_host_state.h"
6
7 SSLHostState::SSLHostState() {
8 }
9
10 SSLHostState::~SSLHostState() {
11 }
12
13 void SSLHostState::DenyCertForHost(net::X509Certificate* cert,
14 const std::string& host) {
15 DCHECK(CalledOnValidThread());
16
17 // Remember that we don't like this cert for this host.
18 cert_policy_for_host_[host].Deny(cert);
19 }
20
21 void SSLHostState::AllowCertForHost(net::X509Certificate* cert,
22 const std::string& host) {
23 DCHECK(CalledOnValidThread());
24
25 // Remember that we do like this cert for this host.
26 cert_policy_for_host_[host].Allow(cert);
27 }
28
29 net::X509Certificate::Policy::Judgment SSLHostState::QueryPolicy(
30 net::X509Certificate* cert, const std::string& host) {
31 DCHECK(CalledOnValidThread());
32
33 return cert_policy_for_host_[host].Check(cert);
34 }
35
36 bool SSLHostState::CanShowInsecureContent(const GURL& url) {
37 DCHECK(CalledOnValidThread());
38
39 return (can_show_insecure_content_for_host_.find(url.host()) !=
40 can_show_insecure_content_for_host_.end());
41 }
42
43 void SSLHostState::AllowShowInsecureContentForURL(const GURL& url) {
44 DCHECK(CalledOnValidThread());
45
46 can_show_insecure_content_for_host_.insert(url.host());
47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698