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

Unified Diff: content/child/indexed_db/webidbcursor_impl.cc

Issue 2480293004: Mandate unique_ptr for base::IDMap in IDMapOwnPointer mode. (Closed)
Patch Set: Rebase on some ScreenOrientation changes, update that stuff to use unique_ptr (the change I was sca… Created 4 years, 1 month 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: content/child/indexed_db/webidbcursor_impl.cc
diff --git a/content/child/indexed_db/webidbcursor_impl.cc b/content/child/indexed_db/webidbcursor_impl.cc
index 11294b688390ceab11b5412084c2ce9bf829687e..1d1119246dd2c59119c168b4fc2214ac9123e248 100644
--- a/content/child/indexed_db/webidbcursor_impl.cc
+++ b/content/child/indexed_db/webidbcursor_impl.cc
@@ -6,7 +6,9 @@
#include <stddef.h>
+#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include "content/child/indexed_db/indexed_db_dispatcher.h"
@@ -60,8 +62,8 @@ void WebIDBCursorImpl::advance(unsigned long count,
return;
}
ResetPrefetchCache();
- dispatcher->RequestIDBCursorAdvance(
- count, callbacks.release(), ipc_cursor_id_, transaction_id_);
+ dispatcher->RequestIDBCursorAdvance(count, std::move(callbacks),
+ ipc_cursor_id_, transaction_id_);
}
void WebIDBCursorImpl::continueFunction(const WebIDBKey& key,
@@ -91,7 +93,7 @@ void WebIDBCursorImpl::continueFunction(const WebIDBKey& key,
// Request pre-fetch.
++pending_onsuccess_callbacks_;
dispatcher->RequestIDBCursorPrefetch(
- prefetch_amount_, callbacks.release(), ipc_cursor_id_);
+ prefetch_amount_, std::move(callbacks), ipc_cursor_id_);
// Increase prefetch_amount_ exponentially.
prefetch_amount_ *= 2;
@@ -105,11 +107,9 @@ void WebIDBCursorImpl::continueFunction(const WebIDBKey& key,
ResetPrefetchCache();
}
- dispatcher->RequestIDBCursorContinue(IndexedDBKeyBuilder::Build(key),
- IndexedDBKeyBuilder::Build(primary_key),
- callbacks.release(),
- ipc_cursor_id_,
- transaction_id_);
+ dispatcher->RequestIDBCursorContinue(
+ IndexedDBKeyBuilder::Build(key), IndexedDBKeyBuilder::Build(primary_key),
+ std::move(callbacks), ipc_cursor_id_, transaction_id_);
}
void WebIDBCursorImpl::postSuccessHandlerCallback() {

Powered by Google App Engine
This is Rietveld 408576698