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

Side by Side Diff: content/browser/indexed_db/indexed_db_transaction.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/indexed_db/indexed_db_transaction.h" 5 #include "content/browser/indexed_db/indexed_db_transaction.h"
6 6
7 #include <vector>
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/indexed_db/indexed_db_backing_store.h" 9 #include "content/browser/indexed_db/indexed_db_backing_store.h"
11 #include "content/browser/indexed_db/indexed_db_cursor.h" 10 #include "content/browser/indexed_db/indexed_db_cursor.h"
12 #include "content/browser/indexed_db/indexed_db_database.h" 11 #include "content/browser/indexed_db/indexed_db_database.h"
13 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" 12 #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
14 #include "content/browser/indexed_db/indexed_db_tracing.h" 13 #include "content/browser/indexed_db/indexed_db_tracing.h"
15 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" 14 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h"
16 #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h" 15 #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h"
17 16
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // operations like closing connections. 246 // operations like closing connections.
248 database_->transaction_coordinator().DidFinishTransaction(this); 247 database_->transaction_coordinator().DidFinishTransaction(this);
249 database_->TransactionFinished(this); 248 database_->TransactionFinished(this);
250 249
251 if (committed) { 250 if (committed) {
252 callbacks_->OnComplete(id_); 251 callbacks_->OnComplete(id_);
253 database_->TransactionFinishedAndCompleteFired(this); 252 database_->TransactionFinishedAndCompleteFired(this);
254 } else { 253 } else {
255 callbacks_->OnAbort( 254 callbacks_->OnAbort(
256 id_, 255 id_,
257 IndexedDBDatabaseError( 256 IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError,
258 WebKit::WebIDBDatabaseExceptionUnknownError, 257 "Internal error committing transaction."));
259 "Internal error committing transaction."));
260 database_->TransactionFinishedAndAbortFired(this); 258 database_->TransactionFinishedAndAbortFired(this);
261 } 259 }
262 260
263 database_ = NULL; 261 database_ = NULL;
264 } 262 }
265 263
266 void IndexedDBTransaction::TaskTimerFired() { 264 void IndexedDBTransaction::TaskTimerFired() {
267 IDB_TRACE("IndexedDBTransaction::TaskTimerFired"); 265 IDB_TRACE("IndexedDBTransaction::TaskTimerFired");
268 DCHECK(!IsTaskQueueEmpty()); 266 DCHECK(!IsTaskQueueEmpty());
269 267
(...skipping 27 matching lines...) Expand all
297 295
298 void IndexedDBTransaction::CloseOpenCursors() { 296 void IndexedDBTransaction::CloseOpenCursors() {
299 for (std::set<IndexedDBCursor*>::iterator i = open_cursors_.begin(); 297 for (std::set<IndexedDBCursor*>::iterator i = open_cursors_.begin();
300 i != open_cursors_.end(); 298 i != open_cursors_.end();
301 ++i) 299 ++i)
302 (*i)->Close(); 300 (*i)->Close();
303 open_cursors_.clear(); 301 open_cursors_.clear();
304 } 302 }
305 303
306 } // namespace content 304 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698