Bug 1400544 - Include full host name in site identity popup. r?liuche
MozReview-Commit-ID: FFojx008ZWK
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java
@@ -490,17 +490,17 @@ public class SiteIdentityPopup extends A
addSelectLoginDoorhanger(selectedTab);
if (mSiteIdentity.getSecurityMode() == SecurityMode.CHROMEUI) {
// For about: pages we display the product icon in place of the verified/globe
// image, hence we don't also set the favicon (for most about pages the
// favicon is the product icon, hence we'd be showing the same icon twice).
mTitle.setText(R.string.moz_app_displayname);
} else {
- mTitle.setText(selectedTab.getBaseDomain());
+ mTitle.setText(mSiteIdentity.getHost());
final Bitmap favicon = selectedTab.getFavicon();
if (favicon != null) {
final Drawable faviconDrawable = new BitmapDrawable(mResources, favicon);
final int dimen = (int) mResources.getDimension(R.dimen.browser_toolbar_favicon_size);
faviconDrawable.setBounds(0, 0, dimen, dimen);
TextViewCompat.setCompoundDrawablesRelative(mTitle, faviconDrawable, null, null, null);
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -5608,32 +5608,32 @@ var IdentityHandler = {
mode: {
identity: identityMode,
mixed_display: mixedDisplay,
mixed_active: mixedActive,
tracking: trackingMode
}
};
+ result.host = this.getEffectiveHost();
+
// Don't show identity data for pages with an unknown identity or if any
// mixed content is loaded (mixed display content is loaded by default).
// We also return for CHROMEUI pages since they don't have any certificate
// information to load either. result.secure specifically refers to connection
// security, which is irrelevant for about: pages, as they're loaded locally.
if (identityMode == this.IDENTITY_MODE_UNKNOWN ||
identityMode == this.IDENTITY_MODE_CHROMEUI ||
aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) {
result.secure = false;
return result;
}
result.secure = true;
- result.host = this.getEffectiveHost();
-
let iData = this.getIdentityData();
result.verifier = Strings.browser.formatStringFromName("identity.identified.verifier", [iData.caOrg], 1);
// If the cert is identified, then we can populate the results with credentials
if (aState & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) {
result.owner = iData.subjectOrg;
// Build an appropriate supplemental block out of whatever location data we have