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

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

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/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 75c342ab55f39432cbe3d0cad774d37c79d6871d..6bccdc3d44497184a91878e4dda242b3f71029bd 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils.h
+++ b/chrome/browser/android/offline_pages/offline_page_utils.h
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include "base/callback.h"
+
class GURL;
namespace content {
@@ -22,16 +24,29 @@ class OfflinePageUtils {
static bool MightBeOfflineURL(const GURL& url);
// Gets an offline URL of an offline page with |online_url| if one exists.
- static GURL GetOfflineURLForOnlineURL(
+ // Deprecated. Use |GetOfflineURLForOnlineURL|.
+ static GURL MaybeGetOfflineURLForOnlineURL(
content::BrowserContext* browser_context,
const GURL& online_url);
+ static void GetOfflineURLForOnlineURL(
+ content::BrowserContext* browser_context,
+ const GURL& online_url,
+ const base::Callback<void(const GURL&)>& callback);
+
// Gets an online URL of an offline page with |offline_url| if one exists.
- static GURL GetOnlineURLForOfflineURL(
+ // Deprecated. Use |GetOnlineURLForOfflineURL|.
+ static GURL MaybeGetOnlineURLForOfflineURL(
content::BrowserContext* browser_context,
const GURL& offline_url);
+ static void GetOnlineURLForOfflineURL(
+ content::BrowserContext* browser_context,
+ const GURL& offline_url,
+ const base::Callback<void(const GURL&)>& callback);
+
// Checks whether |offline_url| points to an offline page.
+ // Deprecated. Use something else.
static bool IsOfflinePage(content::BrowserContext* browser_context,
const GURL& offline_url);

Powered by Google App Engine
This is Rietveld 408576698