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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 2397273002: Show a custom page info bubble for chrome-devtools:// URLs (Closed)
Patch Set: Fix mac build Created 4 years, 2 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 (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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 site_url().host()); 392 site_url().host());
393 did_revoke_user_ssl_decisions_ = true; 393 did_revoke_user_ssl_decisions_ = true;
394 } 394 }
395 395
396 void WebsiteSettings::Init( 396 void WebsiteSettings::Init(
397 const GURL& url, 397 const GURL& url,
398 const SecurityStateModel::SecurityInfo& security_info) { 398 const SecurityStateModel::SecurityInfo& security_info) {
399 bool isChromeUINativeScheme = false; 399 bool isChromeUINativeScheme = false;
400 #if BUILDFLAG(ANDROID_JAVA_UI) 400 #if BUILDFLAG(ANDROID_JAVA_UI)
401 isChromeUINativeScheme = url.SchemeIs(chrome::kChromeUINativeScheme); 401 isChromeUINativeScheme = url.SchemeIs(chrome::kChromeUINativeScheme);
402 #else
403 // On desktop, internal URLs are displayed in a different UI and not here.
elawrence 2016/10/07 21:04:01 Is "desktop" mutually exclusive with "ANDROID_JAVA
meacer 2016/10/10 18:09:19 Ah, ANDROID_JAVA_UI really confused me. I thought
404 DCHECK(!url.SchemeIs(content::kChromeUIScheme) &&
405 !url.SchemeIs(content::kChromeDevToolsScheme) &&
406 !url.SchemeIs(content::kViewSourceScheme) &&
407 !url.SchemeIs(content_settings::kExtensionScheme));
402 #endif 408 #endif
403 409
404 if (url.SchemeIs(url::kAboutScheme)) { 410 if (url.SchemeIs(url::kAboutScheme)) {
405 // All about: URLs except about:blank are redirected. 411 // All about: URLs except about:blank are redirected.
406 DCHECK_EQ(url::kAboutBlankURL, url.spec()); 412 DCHECK_EQ(url::kAboutBlankURL, url.spec());
407 site_identity_status_ = SITE_IDENTITY_STATUS_NO_CERT; 413 site_identity_status_ = SITE_IDENTITY_STATUS_NO_CERT;
408 site_identity_details_ = 414 site_identity_details_ =
409 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY); 415 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY);
410 site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED; 416 site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED;
411 site_connection_details_ = l10n_util::GetStringFUTF16( 417 site_connection_details_ = l10n_util::GetStringFUTF16(
412 IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, 418 IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT,
413 UTF8ToUTF16(url.spec())); 419 UTF8ToUTF16(url.spec()));
414 return; 420 return;
415 } 421 }
416 422
417 if (url.SchemeIs(content::kChromeUIScheme) || isChromeUINativeScheme) { 423 if (isChromeUINativeScheme) {
elawrence 2016/10/07 21:04:01 I'm not sure I understand this change. Is this:
meacer 2016/10/10 18:09:19 I was being overly aggressive here, reverted this
418 site_identity_status_ = SITE_IDENTITY_STATUS_INTERNAL_PAGE; 424 site_identity_status_ = SITE_IDENTITY_STATUS_INTERNAL_PAGE;
419 site_identity_details_ = 425 site_identity_details_ =
420 l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE); 426 l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE);
421 site_connection_status_ = SITE_CONNECTION_STATUS_INTERNAL_PAGE; 427 site_connection_status_ = SITE_CONNECTION_STATUS_INTERNAL_PAGE;
422 return; 428 return;
423 } 429 }
424 430
425 // Identity section. 431 // Identity section.
426 certificate_ = security_info.certificate; 432 certificate_ = security_info.certificate;
427 433
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 info.connection_status = site_connection_status_; 804 info.connection_status = site_connection_status_;
799 info.connection_status_description = 805 info.connection_status_description =
800 UTF16ToUTF8(site_connection_details_); 806 UTF16ToUTF8(site_connection_details_);
801 info.identity_status = site_identity_status_; 807 info.identity_status = site_identity_status_;
802 info.identity_status_description = 808 info.identity_status_description =
803 UTF16ToUTF8(site_identity_details_); 809 UTF16ToUTF8(site_identity_details_);
804 info.certificate = certificate_; 810 info.certificate = certificate_;
805 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 811 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
806 ui_->SetIdentityInfo(info); 812 ui_->SetIdentityInfo(info);
807 } 813 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698