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

Side by Side Diff: trunk/src/content/browser/indexed_db/indexed_db_transaction.cc

Issue 216433007: Revert 260147 "Handling LevelDB errors encountered after open." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 database_->transaction_coordinator().DidFinishTransaction(this); 252 database_->transaction_coordinator().DidFinishTransaction(this);
253 253
254 if (committed) { 254 if (committed) {
255 abort_task_stack_.clear(); 255 abort_task_stack_.clear();
256 callbacks_->OnComplete(id_); 256 callbacks_->OnComplete(id_);
257 database_->TransactionFinished(this, true); 257 database_->TransactionFinished(this, true);
258 } else { 258 } else {
259 while (!abort_task_stack_.empty()) 259 while (!abort_task_stack_.empty())
260 abort_task_stack_.pop().Run(NULL); 260 abort_task_stack_.pop().Run(NULL);
261 261
262 IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, 262 callbacks_->OnAbort(
263 "Internal error committing transaction."); 263 id_,
264 callbacks_->OnAbort(id_, error); 264 IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError,
265 "Internal error committing transaction."));
265 database_->TransactionFinished(this, false); 266 database_->TransactionFinished(this, false);
266 database_->TransactionCommitFailed(); 267 database_->TransactionCommitFailed();
267 } 268 }
268 269
269 database_ = NULL; 270 database_ = NULL;
270 } 271 }
271 272
272 void IndexedDBTransaction::ProcessTaskQueue() { 273 void IndexedDBTransaction::ProcessTaskQueue() {
273 IDB_TRACE("IndexedDBTransaction::ProcessTaskQueue"); 274 IDB_TRACE("IndexedDBTransaction::ProcessTaskQueue");
274 275
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 336
336 void IndexedDBTransaction::CloseOpenCursors() { 337 void IndexedDBTransaction::CloseOpenCursors() {
337 for (std::set<IndexedDBCursor*>::iterator i = open_cursors_.begin(); 338 for (std::set<IndexedDBCursor*>::iterator i = open_cursors_.begin();
338 i != open_cursors_.end(); 339 i != open_cursors_.end();
339 ++i) 340 ++i)
340 (*i)->Close(); 341 (*i)->Close();
341 open_cursors_.clear(); 342 open_cursors_.clear();
342 } 343 }
343 344
344 } // namespace content 345 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698