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

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

Issue 2053163002: [Offline pages] Adding persistent request queue based on SQLite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing code review feedback from petewil Created 4 years, 6 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 83f59f4b02ef06ebe2234b41adda9bb47f266dca..949853bf364f710f4c16fe34bb11b7de34faf98c 100644
--- a/components/offline_pages/background/request_queue_in_memory_store.cc
+++ b/components/offline_pages/background/request_queue_in_memory_store.cc
@@ -43,7 +43,6 @@ void RequestQueueInMemoryStore::RemoveRequests(
const RemoveCallback& callback) {
// In case the |request_ids| is empty, the result will be true, but the count
// of deleted pages will be empty.
- bool result = true;
int count = 0;
RequestsMap::iterator iter;
for (auto request_id : request_ids) {
@@ -51,13 +50,11 @@ void RequestQueueInMemoryStore::RemoveRequests(
if (iter != requests_.end()) {
requests_.erase(iter);
++count;
- } else {
- result = false;
}
}
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(callback, result, count));
+ FROM_HERE, base::Bind(callback, true, count));
}
void RequestQueueInMemoryStore::Reset(const ResetCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698