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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 2040573002: [Offlining] Updates the tab helper to use the async OfflinePageModel API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address jianli's nits. Created 4 years, 6 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/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 533528fc4cc7baac2aacc91704b2207edcc643a2..17a4440f4b5c94931910ae28b6822272d0009592 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -763,8 +763,8 @@ jlong TabAndroid::GetBookmarkId(JNIEnv* env,
// If the url points to an offline page, then we need to get its original URL.
if (offline_pages::OfflinePageUtils::IsOfflinePage(profile, url)) {
- url = offline_pages::OfflinePageUtils::GetOnlineURLForOfflineURL(profile,
- url);
+ url = offline_pages::OfflinePageUtils::MaybeGetOnlineURLForOfflineURL(
+ profile, url);
}
// Get all the nodes for |url| and sort them by date added.
@@ -819,8 +819,8 @@ ScopedJavaLocalRef<jstring> TabAndroid::GetOfflinePageOriginalUrl(
GURL url = dom_distiller::url_utils::GetOriginalUrlFromDistillerUrl(
web_contents()->GetURL());
GURL original_url =
- offline_pages::OfflinePageUtils::GetOnlineURLForOfflineURL(GetProfile(),
- url);
+ offline_pages::OfflinePageUtils::MaybeGetOnlineURLForOfflineURL(
+ GetProfile(), url);
if (!original_url.is_valid())
return ScopedJavaLocalRef<jstring>();

Powered by Google App Engine
This is Rietveld 408576698