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

Unified Diff: content/browser/indexed_db/indexed_db_cursor.cc

Issue 18075008: IndexedDB: Switch key/value handling from vector<char> to std::string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove C++11ism Created 7 years, 5 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/browser/indexed_db/indexed_db_cursor.h ('k') | content/browser/indexed_db/indexed_db_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_cursor.cc
diff --git a/content/browser/indexed_db/indexed_db_cursor.cc b/content/browser/indexed_db/indexed_db_cursor.cc
index 179797e3d4be210cd60d96ac4e90a03c846fdf94..dd54be06e154224bd1aed5a0efec4d0ca9c6844e 100644
--- a/content/browser/indexed_db/indexed_db_cursor.cc
+++ b/content/browser/indexed_db/indexed_db_cursor.cc
@@ -98,7 +98,7 @@ void IndexedDBCursor::CursorAdvanceOperation::Perform(
IDB_TRACE("CursorAdvanceOperation");
if (!cursor_->cursor_ || !cursor_->cursor_->Advance(count_)) {
cursor_->cursor_.reset();
- callbacks_->OnSuccess(static_cast<std::vector<char>*>(NULL));
+ callbacks_->OnSuccess(static_cast<std::string*>(NULL));
return;
}
@@ -113,7 +113,7 @@ void IndexedDBCursor::CursorIterationOperation::Perform(
!cursor_->cursor_->ContinueFunction(
key_.get(), IndexedDBBackingStore::Cursor::SEEK)) {
cursor_->cursor_.reset();
- callbacks_->OnSuccess(static_cast<std::vector<char>*>(NULL));
+ callbacks_->OnSuccess(static_cast<std::string*>(NULL));
return;
}
@@ -137,7 +137,7 @@ void IndexedDBCursor::CursorPrefetchIterationOperation::Perform(
std::vector<IndexedDBKey> found_keys;
std::vector<IndexedDBKey> found_primary_keys;
- std::vector<std::vector<char> > found_values;
+ std::vector<std::string> found_values;
if (cursor_->cursor_)
cursor_->saved_cursor_.reset(cursor_->cursor_->Clone());
@@ -155,10 +155,10 @@ void IndexedDBCursor::CursorPrefetchIterationOperation::Perform(
switch (cursor_->cursor_type_) {
case indexed_db::CURSOR_KEY_ONLY:
- found_values.push_back(std::vector<char>());
+ found_values.push_back(std::string());
break;
case indexed_db::CURSOR_KEY_AND_VALUE: {
- std::vector<char> value;
+ std::string value;
value.swap(*cursor_->cursor_->Value());
size_estimate += value.size();
found_values.push_back(value);
@@ -175,7 +175,7 @@ void IndexedDBCursor::CursorPrefetchIterationOperation::Perform(
}
if (!found_keys.size()) {
- callbacks_->OnSuccess(static_cast<std::vector<char>*>(NULL));
+ callbacks_->OnSuccess(static_cast<std::string*>(NULL));
return;
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_cursor.h ('k') | content/browser/indexed_db/indexed_db_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698