| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/cert_store.h" | 8 #include "chrome/browser/cert_store.h" |
| 9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
| 10 #include "chrome/browser/ssl/ssl_error_info.h" | 10 #include "chrome/browser/ssl/ssl_error_info.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 break; | 156 break; |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 ToolbarModel::InfoTextType ToolbarModel::GetInfoText(std::wstring* text, | 160 ToolbarModel::InfoTextType ToolbarModel::GetInfoText(std::wstring* text, |
| 161 std::wstring* tooltip) { | 161 std::wstring* tooltip) { |
| 162 DCHECK(text && tooltip); | 162 DCHECK(text && tooltip); |
| 163 text->clear(); | 163 text->clear(); |
| 164 tooltip->clear(); | 164 tooltip->clear(); |
| 165 | 165 |
| 166 if (input_in_progress_) |
| 167 return INFO_NO_INFO; |
| 168 |
| 166 NavigationController* navigation_controller = GetNavigationController(); | 169 NavigationController* navigation_controller = GetNavigationController(); |
| 167 if (!navigation_controller) // We might not have a controller on init. | 170 if (!navigation_controller) // We might not have a controller on init. |
| 168 return INFO_NO_INFO; | 171 return INFO_NO_INFO; |
| 169 | 172 |
| 170 NavigationEntry* entry = navigation_controller->GetActiveEntry(); | 173 NavigationEntry* entry = navigation_controller->GetActiveEntry(); |
| 171 const NavigationEntry::SSLStatus& ssl = entry->ssl(); | 174 const NavigationEntry::SSLStatus& ssl = entry->ssl(); |
| 172 if (!entry || ssl.has_mixed_content() || | 175 if (!entry || ssl.has_mixed_content() || |
| 173 net::IsCertStatusError(ssl.cert_status()) || | 176 net::IsCertStatusError(ssl.cert_status()) || |
| 174 ((ssl.cert_status() & net::CERT_STATUS_IS_EV) == 0)) | 177 ((ssl.cert_status() & net::CERT_STATUS_IS_EV) == 0)) |
| 175 return INFO_NO_INFO; | 178 return INFO_NO_INFO; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // Multiple errors. | 213 // Multiple errors. |
| 211 text->assign(l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS)); | 214 text->assign(l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS)); |
| 212 text->append(L"\n"); | 215 text->append(L"\n"); |
| 213 for (int i = 0; i < error_count; ++i) { | 216 for (int i = 0; i < error_count; ++i) { |
| 214 text->append(errors[i].short_description()); | 217 text->append(errors[i].short_description()); |
| 215 if (i != error_count - 1) | 218 if (i != error_count - 1) |
| 216 text->append(L"\n"); | 219 text->append(L"\n"); |
| 217 } | 220 } |
| 218 } | 221 } |
| 219 } | 222 } |
| OLD | NEW |