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

Side by Side Diff: android_webview/browser/aw_ssl_host_state_delegate.cc

Issue 1058003004: Forget SSL error exceptions when good certs seen for regular requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Yet Another Webview Fix (should be the last, I swear) Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "android_webview/browser/aw_ssl_host_state_delegate.h" 5 #include "android_webview/browser/aw_ssl_host_state_delegate.h"
6 6
7 #include "net/base/hash_value.h" 7 #include "net/base/hash_value.h"
8 8
9 using content::SSLHostStateDelegate; 9 using content::SSLHostStateDelegate;
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 SSLHostStateDelegate::CertJudgment AwSSLHostStateDelegate::QueryPolicy( 79 SSLHostStateDelegate::CertJudgment AwSSLHostStateDelegate::QueryPolicy(
80 const std::string& host, 80 const std::string& host,
81 const net::X509Certificate& cert, 81 const net::X509Certificate& cert,
82 net::CertStatus error, 82 net::CertStatus error,
83 bool* expired_previous_decision) { 83 bool* expired_previous_decision) {
84 return cert_policy_for_host_[host].Check(cert, error) 84 return cert_policy_for_host_[host].Check(cert, error)
85 ? SSLHostStateDelegate::ALLOWED 85 ? SSLHostStateDelegate::ALLOWED
86 : SSLHostStateDelegate::DENIED; 86 : SSLHostStateDelegate::DENIED;
87 } 87 }
88 88
89 void AwSSLHostStateDelegate::RevokeUserAllowExceptions(
90 const std::string& host) {
91 cert_policy_for_host_.erase(host);
92 }
93
94 bool AwSSLHostStateDelegate::HasAllowException(const std::string& host) const {
95 auto policy_iterator = cert_policy_for_host_.find(host);
96 return policy_iterator != cert_policy_for_host_.end() &&
97 policy_iterator->second.HasAllowException();
98 }
99
89 } // namespace android_webview 100 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_ssl_host_state_delegate.h ('k') | chrome/browser/ssl/chrome_ssl_host_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698