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

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

Issue 2176453002: Update the request count when a request fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 5 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_queue.h
diff --git a/components/offline_pages/background/request_queue.h b/components/offline_pages/background/request_queue.h
index 4aed02cab7512ec912ec7be36babdaf56b5d7643..869f072e1f69594fa99e2999fe624176568d180c 100644
--- a/components/offline_pages/background/request_queue.h
+++ b/components/offline_pages/background/request_queue.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
namespace offline_pages {
@@ -75,6 +76,12 @@ class RequestQueue {
// |callback|.
void RemoveRequest(int64_t request_id, const UpdateRequestCallback& callback);
+ void GetForUpdateDone(
+ const RequestQueue::UpdateRequestCallback& update_callback,
+ const SavePageRequest& update_request,
+ bool success,
+ const std::vector<SavePageRequest>& requests);
+
private:
// Callback used by |PurgeRequests|.
typedef base::Callback<void(UpdateRequestResult,
@@ -88,6 +95,9 @@ class RequestQueue {
std::unique_ptr<RequestQueueStore> store_;
+ // Allows us to pass a weak pointer to callbacks.
+ base::WeakPtrFactory<RequestQueue> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(RequestQueue);
};

Powered by Google App Engine
This is Rietveld 408576698