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

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

Issue 450833002: Add additional UMA stats for remembering certificate decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes from sky Created 6 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/ssl/ssl_host_state.h" 5 #include "content/browser/ssl/ssl_host_state.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/ssl_host_state_delegate.h" 10 #include "content/public/browser/ssl_host_state_delegate.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return delegate_->HasAllowedOrDeniedCert(host); 97 return delegate_->HasAllowedOrDeniedCert(host);
98 } 98 }
99 99
100 void SSLHostState::Clear() { 100 void SSLHostState::Clear() {
101 if (!delegate_) 101 if (!delegate_)
102 return; 102 return;
103 103
104 delegate_->Clear(); 104 delegate_->Clear();
105 } 105 }
106 106
107 net::CertPolicy::Judgment SSLHostState::QueryPolicy(net::X509Certificate* cert, 107 net::CertPolicy::Judgment SSLHostState::QueryPolicy(
108 const std::string& host, 108 net::X509Certificate* cert,
109 net::CertStatus error) { 109 const std::string& host,
110 net::CertStatus error,
111 bool* expired_previous_decision) {
110 DCHECK(CalledOnValidThread()); 112 DCHECK(CalledOnValidThread());
111 113
112 if (!delegate_) 114 if (!delegate_) {
115 *expired_previous_decision = false;
113 return net::CertPolicy::Judgment::UNKNOWN; 116 return net::CertPolicy::Judgment::UNKNOWN;
117 }
114 118
115 return delegate_->QueryPolicy(host, cert, error); 119 return delegate_->QueryPolicy(host, cert, error, expired_previous_decision);
116 } 120 }
117 121
118 } // namespace content 122 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698