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

Side by Side Diff: chrome/browser/toolbar_model.cc

Issue 2063008: (Original patch reviewed at http://codereview.chromium.org/2067003 )... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/common/notification_type.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/toolbar_model.h" 5 #include "chrome/browser/toolbar_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/cert_store.h" 9 #include "chrome/browser/cert_store.h"
10 #include "chrome/browser/pref_service.h" 10 #include "chrome/browser/pref_service.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const NavigationEntry::SSLStatus& ssl = entry->ssl(); 72 const NavigationEntry::SSLStatus& ssl = entry->ssl();
73 switch (ssl.security_style()) { 73 switch (ssl.security_style()) {
74 case SECURITY_STYLE_UNKNOWN: 74 case SECURITY_STYLE_UNKNOWN:
75 case SECURITY_STYLE_UNAUTHENTICATED: 75 case SECURITY_STYLE_UNAUTHENTICATED:
76 return NONE; 76 return NONE;
77 77
78 case SECURITY_STYLE_AUTHENTICATION_BROKEN: 78 case SECURITY_STYLE_AUTHENTICATION_BROKEN:
79 return SECURITY_ERROR; 79 return SECURITY_ERROR;
80 80
81 case SECURITY_STYLE_AUTHENTICATED: 81 case SECURITY_STYLE_AUTHENTICATED:
82 if (ssl.has_mixed_content()) 82 if (ssl.displayed_mixed_content())
83 return SECURITY_WARNING; 83 return SECURITY_WARNING;
84 if (net::IsCertStatusError(ssl.cert_status())) { 84 if (net::IsCertStatusError(ssl.cert_status())) {
85 DCHECK_EQ(ssl.cert_status() & net::CERT_STATUS_ALL_ERRORS, 85 DCHECK_EQ(ssl.cert_status() & net::CERT_STATUS_ALL_ERRORS,
86 net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION); 86 net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION);
87 return SECURITY_WARNING; 87 return SECURITY_WARNING;
88 } 88 }
89 if ((ssl.cert_status() & net::CERT_STATUS_IS_EV) && 89 if ((ssl.cert_status() & net::CERT_STATUS_IS_EV) &&
90 CertStore::GetSharedInstance()->RetrieveCert(ssl.cert_id(), NULL)) 90 CertStore::GetSharedInstance()->RetrieveCert(ssl.cert_id(), NULL))
91 return EV_SECURE; 91 return EV_SECURE;
92 return SECURE; 92 return SECURE;
(...skipping 26 matching lines...) Expand all
119 return SSLManager::GetEVCertName(*cert); 119 return SSLManager::GetEVCertName(*cert);
120 } 120 }
121 121
122 NavigationController* ToolbarModel::GetNavigationController() const { 122 NavigationController* ToolbarModel::GetNavigationController() const {
123 // This |current_tab| can be NULL during the initialization of the 123 // This |current_tab| can be NULL during the initialization of the
124 // toolbar during window creation (i.e. before any tabs have been added 124 // toolbar during window creation (i.e. before any tabs have been added
125 // to the window). 125 // to the window).
126 TabContents* current_tab = browser_->GetSelectedTabContents(); 126 TabContents* current_tab = browser_->GetSelectedTabContents();
127 return current_tab ? &current_tab->controller() : NULL; 127 return current_tab ? &current_tab->controller() : NULL;
128 } 128 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698