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

Unified Diff: chrome/browser/android/offline_pages/offline_page_utils.h

Issue 2225213002: Make GetBestPageForOnlineURL async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make GetBestPageForOnlineURL async 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/browser/android/offline_pages/offline_page_utils.h
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.h b/chrome/browser/android/offline_pages/offline_page_utils.h
index 11455ff2dc72407d4f5efc361127975f7982e138..29733c3d68604f4e269508bd8c0e75013aaf6111 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils.h
+++ b/chrome/browser/android/offline_pages/offline_page_utils.h
@@ -24,6 +24,15 @@ class OfflinePageUtils {
// Returns true if |url| might point to an offline page.
static bool MightBeOfflineURL(const GURL& url);
+ // Returns via callback an offline page saved for |online_url|, if any. The
+ // best page is chosen based on creation date; a more recently created offline
+ // page will be preferred over an older one.
Dmitry Titov 2016/08/10 02:56:37 please add info to the comment on why tab_id is pa
jianli 2016/08/11 00:33:27 Per discussion, renamed to SelectPageForOnlineURL.
+ static void GetBestPageForOnlineURL(
+ content::BrowserContext* browser_context,
+ const GURL& online_url,
+ int tab_id,
+ const base::Callback<void(const OfflinePageItem*)>& callback);
+
// Gets an online URL of an offline page with |offline_url| if one exists.
// Deprecated. Use |GetOnlineURLForOfflineURL|.
static GURL MaybeGetOnlineURLForOfflineURL(

Powered by Google App Engine
This is Rietveld 408576698