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

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

Issue 2715433006: [Offline Pages] Turn Offliner::Cancel into an async operation to resolve conflicting assumptions (Closed)
Patch Set: Created 3 years, 10 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: components/offline_pages/core/background/offliner.h
diff --git a/components/offline_pages/core/background/offliner.h b/components/offline_pages/core/background/offliner.h
index a7a5718596cc1c89d7d29e26c13aa21730241d24..a018c18787d0c6a3a05bf6c2837ca3efd509becc 100644
--- a/components/offline_pages/core/background/offliner.h
+++ b/components/offline_pages/core/background/offliner.h
@@ -61,6 +61,9 @@ class Offliner {
// TODO(dougarnett): consider passing back a request id instead of request.
typedef base::Callback<void(const SavePageRequest&, RequestStatus)>
CompletionCallback;
+ // Reports that the cancel operation has completed.
+ // TODO(chili): make save operation cancellable.
+ typedef base::Callback<void(int64_t request_id)> CancelCallback;
Offliner() {}
virtual ~Offliner() {}
@@ -73,7 +76,7 @@ class Offliner {
// Clears the currently processing request, if any, and skips running its
// CompletionCallback.
- virtual void Cancel() = 0;
+ virtual void Cancel(const CancelCallback& callback) = 0;
// TODO(dougarnett): add policy support methods.
};

Powered by Google App Engine
This is Rietveld 408576698