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

Unified Diff: ios/chrome/browser/reading_list/reading_list_entry.cc

Issue 2506993002: Create offline_url_utils (Closed)
Patch Set: feedback Created 4 years, 1 month 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: ios/chrome/browser/reading_list/reading_list_entry.cc
diff --git a/ios/chrome/browser/reading_list/reading_list_entry.cc b/ios/chrome/browser/reading_list/reading_list_entry.cc
index 5ff3dbc35c7ea75c792c3d13c8304fac99b854f5..e7bbf06568ed52335c1b8fd212c3937ea7804734 100644
--- a/ios/chrome/browser/reading_list/reading_list_entry.cc
+++ b/ios/chrome/browser/reading_list/reading_list_entry.cc
@@ -5,12 +5,7 @@
#include "ios/chrome/browser/reading_list/reading_list_entry.h"
#include "base/memory/ptr_util.h"
-
-namespace {
-// URL used to open offline pages.
-// This variable will be moved to chrome_url_constants.
-const char kChromeUIOfflineURL[] = "chrome://offline/";
-}
+#include "ios/chrome/browser/reading_list/offline_url_utils.h"
// The backoff time is the following: 10min, 10min, 1h, 2h, 2h..., starting
// after the first failure.
@@ -85,10 +80,7 @@ const base::FilePath& ReadingListEntry::DistilledPath() const {
}
const GURL ReadingListEntry::DistilledURL() const {
- if (distilled_path_.empty()) {
- return GURL();
- }
- return GURL(kChromeUIOfflineURL + distilled_path_.value());
+ return reading_list::DistilledURLForPath(distilled_path_);
}
base::TimeDelta ReadingListEntry::TimeUntilNextTry() const {
« no previous file with comments | « ios/chrome/browser/reading_list/offline_url_utils_unittest.cc ('k') | ios/chrome/browser/reading_list/url_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698