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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java

Issue 2245733004: Serve offline page for online URL on disconnected or bad networks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address some more feedback Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
index 3e96ac6c9d30ea08b4e941c6c39969ba9d5b838d..4c0a8ef49c2e795bbbed946e9a5f63db9aa38dc4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
@@ -2064,16 +2064,10 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
updateCustomSelectionActionModeCallback();
}
- /**
- * Gets the URL of the web page in the tab. When displaying offline page it gets the URL of the
- * original page.
- */
+ /** Gets the URL of the web page in the tab. */
private String getOnlineUrlFromTab() {
Dmitry Titov 2016/08/20 01:08:13 I wonder if this method deserves to exist, it's pr
jianli 2016/08/20 01:48:52 I think it is needed since tab might be null. Rena
Tab currentTab = getCurrentTab();
if (currentTab == null) return "";
- if (currentTab.isOfflinePage()) {
- return currentTab.getOriginalUrl().trim();
- }
return currentTab.getUrl().trim();
}

Powered by Google App Engine
This is Rietveld 408576698