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

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

Issue 1947253002: [Offline pages] Implementation of RequestQueue: Add, Remove, Get (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removing optional Created 4 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
« no previous file with comments | « components/offline_pages/background/BUILD.gn ('k') | components/offline_pages/background/request_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/request_queue.h
diff --git a/components/offline_pages/background/request_queue.h b/components/offline_pages/background/request_queue.h
index afae725b64609daf5cb63fcbe3d9df06b66f6971..5df83fd13d637a7d09f6b56df9f4cc86a11a4034 100644
--- a/components/offline_pages/background/request_queue.h
+++ b/components/offline_pages/background/request_queue.h
@@ -6,12 +6,16 @@
#define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_
#include <stdint.h>
+
+#include <memory>
#include <vector>
#include "base/callback.h"
+#include "base/macros.h"
namespace offline_pages {
+class RequestQueueStore;
class SavePageRequest;
// Class responsible for managing save page requests.
@@ -48,6 +52,9 @@ class RequestQueue {
// Callback used by |UdpateRequest| and |RemoveRequest|.
typedef base::Callback<void(UpdateRequestResult)> UpdateRequestCallback;
+ explicit RequestQueue(std::unique_ptr<RequestQueueStore> store);
+ ~RequestQueue();
+
// Gets all of the active requests from the store. Calling this method may
// schedule purging of the request queue.
void GetRequests(const GetRequestsCallback& callback);
@@ -78,6 +85,10 @@ class RequestQueue {
// expired request. Result is returned through |callback| carries the number
// of removed requests.
void PurgeRequests(const PurgeRequestsCallback& callback);
+
+ std::unique_ptr<RequestQueueStore> store_;
+
+ DISALLOW_COPY_AND_ASSIGN(RequestQueue);
};
} // namespace offline_pages
« no previous file with comments | « components/offline_pages/background/BUILD.gn ('k') | components/offline_pages/background/request_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698