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

Unified Diff: components/offline_pages/background/request_queue_in_memory_store.cc

Issue 2228813003: Changes to fit better with the needs of the download manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_in_memory_store.cc
diff --git a/components/offline_pages/background/request_queue_in_memory_store.cc b/components/offline_pages/background/request_queue_in_memory_store.cc
index 32219a91616eef459ea08ab4fb7116258f781355..68a041545738054a64329dd8796c46537b879d08 100644
--- a/components/offline_pages/background/request_queue_in_memory_store.cc
+++ b/components/offline_pages/background/request_queue_in_memory_store.cc
@@ -4,8 +4,6 @@
#include "components/offline_pages/background/request_queue_in_memory_store.h"
-#include <set>
-
#include "base/bind.h"
#include "base/location.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -54,25 +52,6 @@ void RequestQueueInMemoryStore::RemoveRequests(
FROM_HERE, base::Bind(callback, true, count));
}
-void RequestQueueInMemoryStore::RemoveRequestsByClientId(
- const std::vector<ClientId>& client_ids,
- const RemoveCallback& callback) {
- int count = 0;
-
- std::set<ClientId> client_id_set(client_ids.begin(), client_ids.end());
- for (auto iter = requests_.begin(); iter != requests_.end(); ) {
- if (client_id_set.find(iter->second.client_id()) != client_id_set.end()) {
- requests_.erase(iter++);
- ++count;
- } else {
- ++iter;
- }
- }
-
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(callback, true, count));
-}
-
void RequestQueueInMemoryStore::Reset(const ResetCallback& callback) {
requests_.clear();
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698