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

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

Issue 7111013: Move most of the core SSL code from chrome to content. The UI code that's specific to Chrome (i.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « chrome/browser/ssl/ssl_host_state.h ('k') | chrome/browser/ssl/ssl_host_state_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 #include "base/logging.h"
8
9 SSLHostState::SSLHostState() {
10 }
11
12 SSLHostState::~SSLHostState() {
13 }
14
15 void SSLHostState::HostRanInsecureContent(const std::string& host, int pid) {
16 DCHECK(CalledOnValidThread());
17 ran_insecure_content_hosts_.insert(BrokenHostEntry(host, pid));
18 }
19
20 bool SSLHostState::DidHostRunInsecureContent(const std::string& host,
21 int pid) const {
22 DCHECK(CalledOnValidThread());
23 return !!ran_insecure_content_hosts_.count(BrokenHostEntry(host, pid));
24 }
25
26 void SSLHostState::DenyCertForHost(net::X509Certificate* cert,
27 const std::string& host) {
28 DCHECK(CalledOnValidThread());
29
30 cert_policy_for_host_[host].Deny(cert);
31 }
32
33 void SSLHostState::AllowCertForHost(net::X509Certificate* cert,
34 const std::string& host) {
35 DCHECK(CalledOnValidThread());
36
37 cert_policy_for_host_[host].Allow(cert);
38 }
39
40 net::CertPolicy::Judgment SSLHostState::QueryPolicy(
41 net::X509Certificate* cert, const std::string& host) {
42 DCHECK(CalledOnValidThread());
43
44 return cert_policy_for_host_[host].Check(cert);
45 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_host_state.h ('k') | chrome/browser/ssl/ssl_host_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698