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

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

Issue 2744553005: [Offline Pages] Turn Offliner::Cancel into an async operation to resolve conflicting assumptions be… (Closed)
Patch Set: Created 3 years, 9 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 bd03ff81ecb4028e190018a0fd80c632729686d4..2f1512899771bdd9255b04c2a535bbf9a3676416 100644
--- a/components/offline_pages/core/background/offliner.h
+++ b/components/offline_pages/core/background/offliner.h
@@ -66,6 +66,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() {}
@@ -81,7 +84,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;
// Handles timeout scenario. Returns true if lowbar is met and try to do a
// snapshot of the current webcontents.

Powered by Google App Engine
This is Rietveld 408576698