| Index: chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java
|
| index 68a38e87959aee029f05233c28d25bbaf24e357b..27f59dc27e9c2d77544c2e840327a8914848a1c5 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java
|
| @@ -376,7 +376,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
|
|
|
| // Work out the URL and connection message and status visibility.
|
| mFullUrl = mWebContents.getVisibleUrl();
|
| - if (isShowingOfflinePage()) {
|
| + if (mTab.isOfflinePage()) {
|
| mFullUrl = OfflinePageUtils.stripSchemeFromOnlineUrl(mFullUrl);
|
| }
|
|
|
| @@ -400,7 +400,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
|
| mSiteSettingsButton.setVisibility(View.GONE);
|
| }
|
|
|
| - if (isShowingOfflinePage()) {
|
| + if (mTab.isOfflinePage()) {
|
| boolean isConnected = OfflinePageUtils.isConnected();
|
| RecordHistogram.recordBooleanHistogram(
|
| "OfflinePages.WebsiteSettings.OpenOnlineButtonVisible", isConnected);
|
| @@ -409,7 +409,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
|
| mOpenOnlineButton.setVisibility(View.GONE);
|
| }
|
|
|
| - mInstantAppIntent = (mIsInternalPage || isShowingOfflinePage()) ? null
|
| + mInstantAppIntent = (mIsInternalPage || mTab.isOfflinePage()) ? null
|
| : InstantAppsHandler.getInstance().getInstantAppIntentForUrl(mFullUrl);
|
| if (mInstantAppIntent == null) mInstantAppButton.setVisibility(View.GONE);
|
|
|
| @@ -522,7 +522,8 @@ public class WebsiteSettingsPopup implements OnClickListener {
|
| * HTTPS connections.
|
| */
|
| private boolean isConnectionDetailsLinkVisible() {
|
| - return mContentPublisher == null && !isShowingOfflinePage() && mParsedUrl != null
|
| + return mContentPublisher == null && !mTab.isShowingErrorPage()
|
| + && !mTab.isOfflinePage() && mParsedUrl != null
|
| && mParsedUrl.getScheme() != null && mParsedUrl.getScheme().equals("https");
|
| }
|
|
|
| @@ -649,11 +650,11 @@ public class WebsiteSettingsPopup implements OnClickListener {
|
| if (mContentPublisher != null) {
|
| messageBuilder.append(
|
| mContext.getString(R.string.page_info_domain_hidden, mContentPublisher));
|
| - } else if (isShowingOfflinePage()) {
|
| + } else if (mTab.isOfflinePage()) {
|
| messageBuilder.append(String.format(
|
| mContext.getString(R.string.page_info_connection_offline),
|
| mOfflinePageCreationDate));
|
| - } else {
|
| + } else if (!mTab.isShowingErrorPage()) {
|
| if (!TextUtils.equals(summary, details)) {
|
| mConnectionSummary.setVisibility(View.VISIBLE);
|
| mConnectionSummary.setText(summary);
|
| @@ -922,13 +923,6 @@ public class WebsiteSettingsPopup implements OnClickListener {
|
| }
|
|
|
| /**
|
| - * Whether website dialog is displayed for an offline page.
|
| - */
|
| - private boolean isShowingOfflinePage() {
|
| - return mOfflinePageCreationDate != null;
|
| - }
|
| -
|
| - /**
|
| * Shows a WebsiteSettings dialog for the provided Tab. The popup adds itself to the view
|
| * hierarchy which owns the reference while it's visible.
|
| *
|
|
|