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

Unified Diff: content/common/indexed_db/proxy_webidbcursor_impl.cc

Issue 10854081: IndexedDB: Simplify cursor data callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « content/common/indexed_db/proxy_webidbcursor_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/indexed_db/proxy_webidbcursor_impl.cc
diff --git a/content/common/indexed_db/proxy_webidbcursor_impl.cc b/content/common/indexed_db/proxy_webidbcursor_impl.cc
index 7abe80edfe2835f2eae544c034b64c708301cfdd..c5db1a28c63aafcd640f24ac177d6adf6682670a 100644
--- a/content/common/indexed_db/proxy_webidbcursor_impl.cc
+++ b/content/common/indexed_db/proxy_webidbcursor_impl.cc
@@ -37,21 +37,6 @@ RendererWebIDBCursorImpl::~RendererWebIDBCursorImpl() {
dispatcher->CursorDestroyed(idb_cursor_id_);
}
-// TODO(jsbell): Remove the following method after WK92278 rolls.
-WebIDBKey RendererWebIDBCursorImpl::key() const {
- return key_;
-}
-
-// TODO(jsbell): Remove the following method after WK92278 rolls.
-WebIDBKey RendererWebIDBCursorImpl::primaryKey() const {
- return primary_key_;
-}
-
-// TODO(jsbell): Remove the following method after WK92278 rolls.
-WebSerializedScriptValue RendererWebIDBCursorImpl::value() const {
- return value_;
-}
-
void RendererWebIDBCursorImpl::advance(unsigned long count,
WebIDBCallbacks* callbacks_ptr,
WebExceptionCode& ec) {
@@ -123,16 +108,6 @@ void RendererWebIDBCursorImpl::postSuccessHandlerCallback() {
ResetPrefetchCache();
}
-// TODO(jsbell): Remove the following method after WK92278 rolls.
-void RendererWebIDBCursorImpl::SetKeyAndValue(
- const IndexedDBKey& key,
- const IndexedDBKey& primary_key,
- const SerializedScriptValue& value) {
- key_ = key;
- primary_key_ = primary_key;
- value_ = value;
-}
-
void RendererWebIDBCursorImpl::SetPrefetchData(
const std::vector<IndexedDBKey>& keys,
const std::vector<IndexedDBKey>& primary_keys,
@@ -151,10 +126,9 @@ void RendererWebIDBCursorImpl::CachedContinue(
DCHECK(prefetch_primary_keys_.size() == prefetch_keys_.size());
DCHECK(prefetch_values_.size() == prefetch_keys_.size());
- // TODO(jsbell): Turn these three variables into locals after WK92278 rolls.
- key_ = prefetch_keys_.front();
- primary_key_ = prefetch_primary_keys_.front();
- value_ = prefetch_values_.front();
+ IndexedDBKey key = prefetch_keys_.front();
+ IndexedDBKey primary_key = prefetch_primary_keys_.front();
+ SerializedScriptValue value = prefetch_values_.front();
prefetch_keys_.pop_front();
prefetch_primary_keys_.pop_front();
@@ -163,9 +137,7 @@ void RendererWebIDBCursorImpl::CachedContinue(
pending_onsuccess_callbacks_++;
- // TODO(jsbell): Remove the ...WithContinuation call after WK92278 rolls.
- callbacks->onSuccessWithContinuation();
- callbacks->onSuccess(key_, primary_key_, value_);
+ callbacks->onSuccess(key, primary_key, value);
}
void RendererWebIDBCursorImpl::ResetPrefetchCache() {
« no previous file with comments | « content/common/indexed_db/proxy_webidbcursor_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698