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

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

Issue 2223253003: Remove OfflinePageUtils::GetOfflineURLForOnlineURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.cc b/chrome/browser/android/offline_pages/offline_page_utils.cc
index 6320e525fe41a039c7f4ba13623ac1a83d2caf80..aa787a894110ccd7c5f5a419828dae677b5d6bde 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils.cc
+++ b/chrome/browser/android/offline_pages/offline_page_utils.cc
@@ -73,15 +73,6 @@ void OnGetPageByOfflineURLDone(
callback.Run(result_url);
}
-void OnGetBestPageForOnlineURLDone(
- const base::Callback<void(const GURL&)>& callback,
- const OfflinePageItem* item) {
- GURL result_url;
- if (item)
- result_url = item->GetOfflineURL();
- callback.Run(result_url);
-}
-
} // namespace
// static
@@ -94,23 +85,6 @@ bool OfflinePageUtils::MightBeOfflineURL(const GURL& url) {
}
// static
-void OfflinePageUtils::GetOfflineURLForOnlineURL(
- content::BrowserContext* browser_context,
- const GURL& online_url,
- const base::Callback<void(const GURL&)>& callback) {
- OfflinePageModel* offline_page_model =
- OfflinePageModelFactory::GetForBrowserContext(browser_context);
- if (!offline_page_model) {
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(&OnGetPageByOfflineURLDone, callback, nullptr));
- return;
- }
-
- offline_page_model->GetBestPageForOnlineURL(
- online_url, base::Bind(&OnGetBestPageForOnlineURLDone, callback));
-}
-
-// static
GURL OfflinePageUtils::MaybeGetOnlineURLForOfflineURL(
content::BrowserContext* browser_context,
const GURL& offline_url) {

Powered by Google App Engine
This is Rietveld 408576698