OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/toolbar/toolbar_model.h" | 5 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/autocomplete/autocomplete.h" | 8 #include "chrome/browser/autocomplete/autocomplete.h" |
9 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 9 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 case SECURITY_STYLE_UNAUTHENTICATED: | 79 case SECURITY_STYLE_UNAUTHENTICATED: |
80 return NONE; | 80 return NONE; |
81 | 81 |
82 case SECURITY_STYLE_AUTHENTICATION_BROKEN: | 82 case SECURITY_STYLE_AUTHENTICATION_BROKEN: |
83 return SECURITY_ERROR; | 83 return SECURITY_ERROR; |
84 | 84 |
85 case SECURITY_STYLE_AUTHENTICATED: | 85 case SECURITY_STYLE_AUTHENTICATED: |
86 if (ssl.displayed_insecure_content()) | 86 if (ssl.displayed_insecure_content()) |
87 return SECURITY_WARNING; | 87 return SECURITY_WARNING; |
88 if (net::IsCertStatusError(ssl.cert_status())) { | 88 if (net::IsCertStatusError(ssl.cert_status())) { |
89 DCHECK_EQ(ssl.cert_status() & net::CERT_STATUS_ALL_ERRORS, | 89 DCHECK_EQ(net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION, |
90 net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION); | 90 ssl.cert_status() & net::CERT_STATUS_ALL_ERRORS); |
91 return SECURITY_WARNING; | 91 return SECURITY_WARNING; |
92 } | 92 } |
93 if ((ssl.cert_status() & net::CERT_STATUS_IS_EV) && | 93 if ((ssl.cert_status() & net::CERT_STATUS_IS_EV) && |
94 CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), NULL)) | 94 CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), NULL)) |
95 return EV_SECURE; | 95 return EV_SECURE; |
96 return SECURE; | 96 return SECURE; |
97 | 97 |
98 default: | 98 default: |
99 NOTREACHED(); | 99 NOTREACHED(); |
100 return NONE; | 100 return NONE; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 UTF8ToUTF16(cert.subject().country_name)); | 138 UTF8ToUTF16(cert.subject().country_name)); |
139 } | 139 } |
140 | 140 |
141 NavigationController* ToolbarModel::GetNavigationController() const { | 141 NavigationController* ToolbarModel::GetNavigationController() const { |
142 // This |current_tab| can be NULL during the initialization of the | 142 // This |current_tab| can be NULL during the initialization of the |
143 // toolbar during window creation (i.e. before any tabs have been added | 143 // toolbar during window creation (i.e. before any tabs have been added |
144 // to the window). | 144 // to the window). |
145 TabContents* current_tab = browser_->GetSelectedTabContents(); | 145 TabContents* current_tab = browser_->GetSelectedTabContents(); |
146 return current_tab ? ¤t_tab->controller() : NULL; | 146 return current_tab ? ¤t_tab->controller() : NULL; |
147 } | 147 } |
OLD | NEW |