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

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

Issue 716843002: Cherrypicking revert which caused a bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
Patch Set: Created 6 years, 1 month 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 | « chrome/browser/ssl/ssl_error_info.cc ('k') | net/base/net_error_list.h » ('j') | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // For all other hosts, which must be DENIED, a blocking page is shown to the 49 // For all other hosts, which must be DENIED, a blocking page is shown to the
50 // user every time they come back to the page. 50 // user every time they come back to the page.
51 int options_mask = 0; 51 int options_mask = 0;
52 switch (handler->cert_error()) { 52 switch (handler->cert_error()) {
53 case net::ERR_CERT_COMMON_NAME_INVALID: 53 case net::ERR_CERT_COMMON_NAME_INVALID:
54 case net::ERR_CERT_DATE_INVALID: 54 case net::ERR_CERT_DATE_INVALID:
55 case net::ERR_CERT_AUTHORITY_INVALID: 55 case net::ERR_CERT_AUTHORITY_INVALID:
56 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: 56 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM:
57 case net::ERR_CERT_WEAK_KEY: 57 case net::ERR_CERT_WEAK_KEY:
58 case net::ERR_CERT_NAME_CONSTRAINT_VIOLATION: 58 case net::ERR_CERT_NAME_CONSTRAINT_VIOLATION:
59 case net::ERR_CERT_VALIDITY_TOO_LONG:
60 if (!handler->fatal()) 59 if (!handler->fatal())
61 options_mask |= OVERRIDABLE; 60 options_mask |= OVERRIDABLE;
62 else 61 else
63 options_mask |= STRICT_ENFORCEMENT; 62 options_mask |= STRICT_ENFORCEMENT;
64 if (expired_previous_decision) 63 if (expired_previous_decision)
65 options_mask |= EXPIRED_PREVIOUS_DECISION; 64 options_mask |= EXPIRED_PREVIOUS_DECISION;
66 OnCertErrorInternal(handler, options_mask); 65 OnCertErrorInternal(handler, options_mask);
67 break; 66 break;
68 case net::ERR_CERT_NO_REVOCATION_MECHANISM: 67 case net::ERR_CERT_NO_REVOCATION_MECHANISM:
69 // Ignore this error. 68 // Ignore this error.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; 231 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED;
233 } 232 }
234 233
235 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { 234 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {
236 GURL parsed_origin(origin); 235 GURL parsed_origin(origin);
237 if (parsed_origin.SchemeIsSecure()) 236 if (parsed_origin.SchemeIsSecure())
238 backend_->HostRanInsecureContent(parsed_origin.host(), pid); 237 backend_->HostRanInsecureContent(parsed_origin.host(), pid);
239 } 238 }
240 239
241 } // namespace content 240 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_error_info.cc ('k') | net/base/net_error_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698