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

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

Issue 2023293002: OfflinePageModel cleanups - improved CanSavePage() and moved static kInvalidOfflineId to impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 e53d52440a79732ef9929bf96a6737f86c1aca09..fe46a10646d2148ed53f2cf8379068635e747157 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils.cc
+++ b/chrome/browser/android/offline_pages/offline_page_utils.cc
@@ -61,6 +61,11 @@ const OfflinePageItem* GetOfflinePageForOfflineURL(
} // namespace
// static
+bool OfflinePageUtils::CanSaveURL(const GURL& url) {
+ return url.is_valid() && url.SchemeIsHTTPOrHTTPS();
+}
+
+// static
bool OfflinePageUtils::MightBeOfflineURL(const GURL& url) {
// It has to be a file URL ending with .mhtml extension.
return url.is_valid() && url.SchemeIsFile() &&

Powered by Google App Engine
This is Rietveld 408576698