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

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

Issue 10830028: IndexedDB: Send cursor data along with success messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment tweaks and rebase 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 adf3ae015beb97fb01dc7c005edcd719eb0dc3d8..7abe80edfe2835f2eae544c034b64c708301cfdd 100644
--- a/content/common/indexed_db/proxy_webidbcursor_impl.cc
+++ b/content/common/indexed_db/proxy_webidbcursor_impl.cc
@@ -37,14 +37,17 @@ 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_;
}
@@ -120,6 +123,7 @@ void RendererWebIDBCursorImpl::postSuccessHandlerCallback() {
ResetPrefetchCache();
}
+// TODO(jsbell): Remove the following method after WK92278 rolls.
void RendererWebIDBCursorImpl::SetKeyAndValue(
const IndexedDBKey& key,
const IndexedDBKey& primary_key,
@@ -147,6 +151,7 @@ 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();
@@ -157,7 +162,10 @@ void RendererWebIDBCursorImpl::CachedContinue(
used_prefetches_++;
pending_onsuccess_callbacks_++;
+
+ // TODO(jsbell): Remove the ...WithContinuation call after WK92278 rolls.
callbacks->onSuccessWithContinuation();
+ 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