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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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> 7 #include <vector>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/indexed_db/indexed_db_backing_store.h" 10 #include "content/browser/indexed_db/indexed_db_backing_store.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // Transactions must also be marked as completed before the 154 // Transactions must also be marked as completed before the
155 // front-end is notified, as the transaction completion unblocks 155 // front-end is notified, as the transaction completion unblocks
156 // operations like closing connections. 156 // operations like closing connections.
157 database_->transaction_coordinator().DidFinishTransaction(this); 157 database_->transaction_coordinator().DidFinishTransaction(this);
158 #ifndef NDEBUG 158 #ifndef NDEBUG
159 DCHECK(!database_->transaction_coordinator().IsActive(this)); 159 DCHECK(!database_->transaction_coordinator().IsActive(this));
160 #endif 160 #endif
161 database_->TransactionFinished(this); 161 database_->TransactionFinished(this);
162 162
163 if (callbacks_) 163 if (callbacks_.get())
164 callbacks_->OnAbort(id_, error); 164 callbacks_->OnAbort(id_, error);
165 165
166 database_->TransactionFinishedAndAbortFired(this); 166 database_->TransactionFinishedAndAbortFired(this);
167 167
168 database_ = NULL; 168 database_ = NULL;
169 } 169 }
170 170
171 bool IndexedDBTransaction::IsTaskQueueEmpty() const { 171 bool IndexedDBTransaction::IsTaskQueueEmpty() const {
172 return preemptive_task_queue_.empty() && task_queue_.empty(); 172 return preemptive_task_queue_.empty() && task_queue_.empty();
173 } 173 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 void IndexedDBTransaction::CloseOpenCursors() { 298 void IndexedDBTransaction::CloseOpenCursors() {
299 for (std::set<IndexedDBCursor*>::iterator i = open_cursors_.begin(); 299 for (std::set<IndexedDBCursor*>::iterator i = open_cursors_.begin();
300 i != open_cursors_.end(); 300 i != open_cursors_.end();
301 ++i) 301 ++i)
302 (*i)->Close(); 302 (*i)->Close();
303 open_cursors_.clear(); 303 open_cursors_.clear();
304 } 304 }
305 305
306 } // namespace content 306 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_quota_client_unittest.cc ('k') | content/browser/indexed_db/webidbdatabase_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698