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

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

Issue 2219463002: SSLPolicy::OnCertError: expired_previous_decision might be used uninitialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_policy.h" 5 #include "content/browser/ssl/ssl_policy.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 25 matching lines...) Expand all
36 SSL_GOOD_CERT_SEEN_EVENT_MAX = 2 36 SSL_GOOD_CERT_SEEN_EVENT_MAX = 2
37 }; 37 };
38 } 38 }
39 39
40 SSLPolicy::SSLPolicy(SSLPolicyBackend* backend) 40 SSLPolicy::SSLPolicy(SSLPolicyBackend* backend)
41 : backend_(backend) { 41 : backend_(backend) {
42 DCHECK(backend_); 42 DCHECK(backend_);
43 } 43 }
44 44
45 void SSLPolicy::OnCertError(SSLCertErrorHandler* handler) { 45 void SSLPolicy::OnCertError(SSLCertErrorHandler* handler) {
46 bool expired_previous_decision; 46 bool expired_previous_decision = false;
47 // First we check if we know the policy for this error. 47 // First we check if we know the policy for this error.
48 DCHECK(handler->ssl_info().is_valid()); 48 DCHECK(handler->ssl_info().is_valid());
49 SSLHostStateDelegate::CertJudgment judgment = 49 SSLHostStateDelegate::CertJudgment judgment =
50 backend_->QueryPolicy(*handler->ssl_info().cert.get(), 50 backend_->QueryPolicy(*handler->ssl_info().cert.get(),
51 handler->request_url().host(), 51 handler->request_url().host(),
52 handler->cert_error(), 52 handler->cert_error(),
53 &expired_previous_decision); 53 &expired_previous_decision);
54 54
55 if (judgment == SSLHostStateDelegate::ALLOWED) { 55 if (judgment == SSLHostStateDelegate::ALLOWED) {
56 handler->ContinueRequest(); 56 handler->ContinueRequest();
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 entry->GetURL(), entry->GetSSL().cert_id, entry->GetSSL().cert_status); 259 entry->GetURL(), entry->GetSSL().cert_id, entry->GetSSL().cert_status);
260 } 260 }
261 261
262 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { 262 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {
263 GURL parsed_origin(origin); 263 GURL parsed_origin(origin);
264 if (parsed_origin.SchemeIsCryptographic()) 264 if (parsed_origin.SchemeIsCryptographic())
265 backend_->HostRanInsecureContent(parsed_origin.host(), pid); 265 backend_->HostRanInsecureContent(parsed_origin.host(), pid);
266 } 266 }
267 267
268 } // namespace content 268 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698