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

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

Issue 2395213002: Implement disabled list (Closed)
Patch Set: Pass the disabled list when looking for a new request. Created 4 years, 2 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/background/request_coordinator.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index 89db5d6559954c0f90ba05d8b6777bf58afbaff3..cf755002e4a12d35e62773b0d3ff5e1a2f2c0d03 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -6,6 +6,7 @@
#define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_
#include <memory>
+#include <set>
#include "base/callback.h"
#include "base/macros.h"
@@ -325,6 +326,9 @@ class RequestCoordinator : public KeyedService,
Offliner::RequestStatus last_offlining_status_;
// Class to choose which request to schedule next
std::unique_ptr<RequestPicker> picker_;
+ // A set of request_ids that we are holding off until the download manager is
+ // done with them.
+ std::set<int64_t> disabled_requests_;
// Calling this returns to the scheduler across the JNI bridge.
base::Callback<void(bool)> scheduler_callback_;
// Logger to record events.

Powered by Google App Engine
This is Rietveld 408576698