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

Side by Side Diff: chrome/browser/ssl/connection_security_helper.cc

Issue 1148743002: Show the location bar in bookmark apps with security errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ssl/connection_security_helper.h" 5 #include "chrome/browser/ssl/connection_security_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (group == switches::kMarkNonSecureAsNonSecure) 50 if (group == switches::kMarkNonSecureAsNonSecure)
51 return ConnectionSecurityHelper::SECURITY_ERROR; 51 return ConnectionSecurityHelper::SECURITY_ERROR;
52 52
53 return ConnectionSecurityHelper::NONE; 53 return ConnectionSecurityHelper::NONE;
54 } 54 }
55 55
56 } // namespace 56 } // namespace
57 57
58 ConnectionSecurityHelper::SecurityLevel 58 ConnectionSecurityHelper::SecurityLevel
59 ConnectionSecurityHelper::GetSecurityLevelForWebContents( 59 ConnectionSecurityHelper::GetSecurityLevelForWebContents(
60 content::WebContents* web_contents) { 60 const content::WebContents* web_contents) {
61 if (!web_contents) 61 if (!web_contents)
62 return NONE; 62 return NONE;
63 63
64 content::NavigationEntry* entry = 64 content::NavigationEntry* entry =
65 web_contents->GetController().GetVisibleEntry(); 65 web_contents->GetController().GetVisibleEntry();
66 if (!entry) 66 if (!entry)
67 return NONE; 67 return NONE;
68 68
69 const content::SSLStatus& ssl = entry->GetSSL(); 69 const content::SSLStatus& ssl = entry->GetSSL();
70 switch (ssl.security_style) { 70 switch (ssl.security_style) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if ((ssl.cert_status & net::CERT_STATUS_IS_EV) && cert) 121 if ((ssl.cert_status & net::CERT_STATUS_IS_EV) && cert)
122 return EV_SECURE; 122 return EV_SECURE;
123 return SECURE; 123 return SECURE;
124 } 124 }
125 125
126 default: 126 default:
127 NOTREACHED(); 127 NOTREACHED();
128 return NONE; 128 return NONE;
129 } 129 }
130 } 130 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/connection_security_helper.h ('k') | chrome/browser/ui/extensions/bookmark_app_browser_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698