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

Unified Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 1460983002: Expose GetLastCommitedOrigin() on WebContents and use it in about:blank (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/website_settings.cc
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index a62ecbe05b8299e22db765d673e87e4f36469814..5255b8d390c57630fde829a6069107590ba602e6 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -360,8 +360,13 @@ void WebsiteSettings::Init(
// All about: URLs except about:blank are redirected.
DCHECK_EQ(url::kAboutBlankURL, url.spec());
site_identity_status_ = SITE_IDENTITY_STATUS_NO_CERT;
+ url::Origin origin = web_contents_->GetLastCommittedOrigin();
site_identity_details_ =
- l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY);
+ origin.unique() ? l10n_util::GetStringUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY)
+ : l10n_util::GetStringFUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_INHERITED_ORIGIN,
+ UTF8ToUTF16(origin.host()));
site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED;
site_connection_details_ = l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT,
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698