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

Unified Diff: components/offline_pages/background/offliner.h

Issue 2007783002: Adds PrerenderingOffliner implementation for handling Loader callbacks and then performing SavePage… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ploader
Patch Set: Update for petewil comment 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
« no previous file with comments | « chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/offliner.h
diff --git a/components/offline_pages/background/offliner.h b/components/offline_pages/background/offliner.h
index ead1adfa503113459cc5ff016081727ce98f6376..745fc6181b678670a377ce8ecaa41c2b0e22c38d 100644
--- a/components/offline_pages/background/offliner.h
+++ b/components/offline_pages/background/offliner.h
@@ -17,11 +17,12 @@ class Offliner {
public:
// Status of processing an offline page request.
enum class RequestStatus {
- UNKNOWN, // No status determined/reported yet.
- LOADED, // Page loaded but not (yet) saved.
- SAVED, // Offline page snapshot saved.
- CANCELED, // Request was canceled.
- FAILED, // Request failed.
+ UNKNOWN, // No status determined/reported yet.
+ LOADED, // Page loaded but not (yet) saved.
+ SAVED, // Offline page snapshot saved.
+ CANCELED, // Request was canceled.
+ FAILED, // Failed to load page.
+ FAILED_SAVE, // Failed to save loaded page.
// TODO(dougarnett): Define a retry-able failure status.
};
@@ -34,7 +35,8 @@ class Offliner {
virtual ~Offliner() {}
// Processes |request| to load and save an offline page.
- // Returns whether the request was accepted or not.
+ // Returns whether the request was accepted or not. |callback| is guaranteed
+ // to be called if the request was accepted and |Cancel()| is not called.
virtual bool LoadAndSave(
const SavePageRequest& request,
const CompletionCallback& callback) = 0;
« no previous file with comments | « chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698