Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/website_settings/website_settings.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 357 const GURL& url, | 357 const GURL& url, |
| 358 const SecurityStateModel::SecurityInfo& security_info) { | 358 const SecurityStateModel::SecurityInfo& security_info) { |
| 359 bool isChromeUINativeScheme = false; | 359 bool isChromeUINativeScheme = false; |
| 360 #if BUILDFLAG(ANDROID_JAVA_UI) | 360 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 361 isChromeUINativeScheme = url.SchemeIs(chrome::kChromeUINativeScheme); | 361 isChromeUINativeScheme = url.SchemeIs(chrome::kChromeUINativeScheme); |
| 362 #endif | 362 #endif |
| 363 | 363 |
| 364 if (url.SchemeIs(url::kAboutScheme)) { | 364 if (url.SchemeIs(url::kAboutScheme)) { |
| 365 // All about: URLs except about:blank are redirected. | 365 // All about: URLs except about:blank are redirected. |
| 366 DCHECK_EQ(url::kAboutBlankURL, url.spec()); | 366 DCHECK_EQ(url::kAboutBlankURL, url.spec()); |
| 367 site_identity_status_ = SITE_IDENTITY_STATUS_NO_CERT; | |
| 368 site_identity_details_ = | |
| 369 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY); | |
| 370 site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED; | |
| 371 site_connection_details_ = l10n_util::GetStringFUTF16( | |
| 372 IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, | |
| 373 UTF8ToUTF16(url.spec())); | |
| 374 return; | |
| 375 } | 367 } |
|
meacer
2016/03/17 22:26:24
This conflicts with https://chromium.googlesource.
| |
| 376 | 368 |
| 377 if (url.SchemeIs(content::kChromeUIScheme) || isChromeUINativeScheme) { | 369 if (url.SchemeIs(content::kChromeUIScheme) || |
| 370 url.SchemeIs(url::kAboutScheme) || isChromeUINativeScheme) { | |
| 378 site_identity_status_ = SITE_IDENTITY_STATUS_INTERNAL_PAGE; | 371 site_identity_status_ = SITE_IDENTITY_STATUS_INTERNAL_PAGE; |
| 379 site_identity_details_ = | 372 site_identity_details_ = |
| 380 l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE); | 373 l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE); |
| 381 site_connection_status_ = SITE_CONNECTION_STATUS_INTERNAL_PAGE; | 374 site_connection_status_ = SITE_CONNECTION_STATUS_INTERNAL_PAGE; |
| 382 return; | 375 return; |
| 383 } | 376 } |
| 384 | 377 |
| 385 // Identity section. | 378 // Identity section. |
| 386 scoped_refptr<net::X509Certificate> cert; | 379 scoped_refptr<net::X509Certificate> cert; |
| 387 cert_id_ = security_info.cert_id; | 380 cert_id_ = security_info.cert_id; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 info.connection_status = site_connection_status_; | 755 info.connection_status = site_connection_status_; |
| 763 info.connection_status_description = | 756 info.connection_status_description = |
| 764 UTF16ToUTF8(site_connection_details_); | 757 UTF16ToUTF8(site_connection_details_); |
| 765 info.identity_status = site_identity_status_; | 758 info.identity_status = site_identity_status_; |
| 766 info.identity_status_description = | 759 info.identity_status_description = |
| 767 UTF16ToUTF8(site_identity_details_); | 760 UTF16ToUTF8(site_identity_details_); |
| 768 info.cert_id = cert_id_; | 761 info.cert_id = cert_id_; |
| 769 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; | 762 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; |
| 770 ui_->SetIdentityInfo(info); | 763 ui_->SetIdentityInfo(info); |
| 771 } | 764 } |
| OLD | NEW |