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

Side by Side Diff: chrome/browser/android/policy/policy_auditor.cc

Issue 2329153002: Remove the WARNING security level.
Patch Set: Restore top control test for sub.originalwebsite.com (but with ERROR instead of WARNING). Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/android/policy/policy_auditor.h" 5 #include "chrome/browser/android/policy/policy_auditor.h"
6 6
7 #include "content/public/browser/navigation_entry.h" 7 #include "content/public/browser/navigation_entry.h"
8 #include "content/public/browser/render_process_host.h" 8 #include "content/public/browser/render_process_host.h"
9 #include "content/public/browser/ssl_status.h" 9 #include "content/public/browser/ssl_status.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 22 matching lines...) Expand all
33 33
34 content::WebContents* web_contents = 34 content::WebContents* web_contents =
35 content::WebContents::FromJavaWebContents(java_web_contents); 35 content::WebContents::FromJavaWebContents(java_web_contents);
36 content::NavigationEntry* entry = 36 content::NavigationEntry* entry =
37 web_contents->GetController().GetVisibleEntry(); 37 web_contents->GetController().GetVisibleEntry();
38 if (!entry) 38 if (!entry)
39 return NONE; 39 return NONE;
40 40
41 const content::SSLStatus& ssl = entry->GetSSL(); 41 const content::SSLStatus& ssl = entry->GetSSL();
42 switch (ssl.security_style) { 42 switch (ssl.security_style) {
43 case content::SECURITY_STYLE_WARNING:
44 case content::SECURITY_STYLE_UNKNOWN: 43 case content::SECURITY_STYLE_UNKNOWN:
45 case content::SECURITY_STYLE_UNAUTHENTICATED: 44 case content::SECURITY_STYLE_UNAUTHENTICATED:
46 return NONE; 45 return NONE;
47 46
48 case content::SECURITY_STYLE_AUTHENTICATION_BROKEN: 47 case content::SECURITY_STYLE_AUTHENTICATION_BROKEN:
49 case content::SECURITY_STYLE_AUTHENTICATED: { 48 case content::SECURITY_STYLE_AUTHENTICATED: {
50 if (net::IsCertStatusError(ssl.cert_status)) { 49 if (net::IsCertStatusError(ssl.cert_status)) {
51 if (ssl.cert_status & net::CERT_STATUS_AUTHORITY_INVALID) 50 if (ssl.cert_status & net::CERT_STATUS_AUTHORITY_INVALID)
52 return CERTIFICATE_FAIL_UNTRUSTED; 51 return CERTIFICATE_FAIL_UNTRUSTED;
53 if (ssl.cert_status & net::CERT_STATUS_REVOKED) 52 if (ssl.cert_status & net::CERT_STATUS_REVOKED)
(...skipping 10 matching lines...) Expand all
64 return CERTIFICATE_FAIL_UNSPECIFIED; 63 return CERTIFICATE_FAIL_UNSPECIFIED;
65 } 64 }
66 } 65 }
67 } 66 }
68 return NONE; 67 return NONE;
69 } 68 }
70 69
71 bool RegisterPolicyAuditor(JNIEnv* env) { 70 bool RegisterPolicyAuditor(JNIEnv* env) {
72 return RegisterNativesImpl(env); 71 return RegisterNativesImpl(env);
73 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698