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

Unified Diff: components/offline_pages/core/prefetch/prefetch_dispatcher.h

Issue 2914703002: [Offline Prefetch] Backoff support for PrefetchBackgroundTask (Closed)
Patch Set: Address feedback Created 3 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: components/offline_pages/core/prefetch/prefetch_dispatcher.h
diff --git a/components/offline_pages/core/prefetch/prefetch_dispatcher.h b/components/offline_pages/core/prefetch/prefetch_dispatcher.h
index 36f9b206de3b4931cd2951798012fbeac27d9977..c9cd246e357934ed3ff4f862be80b23d280edf0e 100644
--- a/components/offline_pages/core/prefetch/prefetch_dispatcher.h
+++ b/components/offline_pages/core/prefetch/prefetch_dispatcher.h
@@ -39,9 +39,9 @@ class PrefetchDispatcher {
ScopedBackgroundTask() = default;
virtual ~ScopedBackgroundTask() = default;
- // Used on destruction to inform the system about whether rescheduling is
- // required.
- virtual void SetNeedsReschedule(bool reschedule) = 0;
+ // Used on destruction to inform the system about whether rescheduling with
+ // or without backoff is required.
+ virtual void SetNeedsReschedule(bool reschedule, bool backoff) = 0;
};
virtual ~PrefetchDispatcher() = default;
@@ -70,7 +70,10 @@ class PrefetchDispatcher {
// Called when a task must stop immediately due to system constraints. After
// this call completes, the system will reschedule the task based on whether
// SetNeedsReschedule has been called.
- virtual void StopBackgroundTask(ScopedBackgroundTask* task) = 0;
+ virtual void StopBackgroundTask() = 0;
+
+ // Used by the test to signal the completion of the background task.
+ virtual void RequestFinishBackgroundTaskForTest() = 0;
};
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698