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

Unified Diff: components/offline_pages/core/background/request_coordinator.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/request_coordinator.h
diff --git a/components/offline_pages/core/background/request_coordinator.h b/components/offline_pages/core/background/request_coordinator.h
index ddf00f2e4bc1173acce2660e46e8ee395574e227..d4b91009ebd52adadba5218bf41f340e8d507fc4 100644
--- a/components/offline_pages/core/background/request_coordinator.h
+++ b/components/offline_pages/core/background/request_coordinator.h
@@ -278,6 +278,17 @@ class RequestCoordinator : public KeyedService,
void HandleRemovedRequests(RequestNotifier::BackgroundSavePageResult status,
std::unique_ptr<UpdateRequestsResult> result);
+ // Handle updating of request status after cancel is called. Will call
+ // HandleCancelRecordResultCallback for UMA handling
+ void HandleCancelUpdateStatusCallback(
+ const Offliner::CancelCallback& next_callback,
+ Offliner::RequestStatus stop_status,
+ int64_t offline_id);
+ void UpdateStatusForCancel(Offliner::RequestStatus stop_status);
+ void ResetActiveRequestCallback(int64_t offline_id);
+ void StartSchedulerCallback(int64_t offline_id);
+ void TryNextRequestCallback(int64_t offline_id);
+
bool StartProcessingInternal(const ProcessingWindowState processing_state,
const base::Callback<void(bool)>& callback);
@@ -322,7 +333,8 @@ class RequestCoordinator : public KeyedService,
void HandleWatchdogTimeout();
// Cancels an in progress pre-rendering, and updates state appropriately.
- void StopPrerendering(Offliner::RequestStatus stop_status);
+ void StopPrerendering(const Offliner::CancelCallback& callback,
+ Offliner::RequestStatus stop_status);
// Marks attempt on the request and sends it to offliner in continuation.
void SendRequestToOffliner(const SavePageRequest& request);

Powered by Google App Engine
This is Rietveld 408576698