OLD | NEW |
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 return; | 205 return; |
206 | 206 |
207 RunTasksIfStarted(); | 207 RunTasksIfStarted(); |
208 } | 208 } |
209 | 209 |
210 class BlobWriteCallbackImpl : public IndexedDBBackingStore::BlobWriteCallback { | 210 class BlobWriteCallbackImpl : public IndexedDBBackingStore::BlobWriteCallback { |
211 public: | 211 public: |
212 explicit BlobWriteCallbackImpl( | 212 explicit BlobWriteCallbackImpl( |
213 scoped_refptr<IndexedDBTransaction> transaction) | 213 scoped_refptr<IndexedDBTransaction> transaction) |
214 : transaction_(transaction) {} | 214 : transaction_(transaction) {} |
215 virtual void Run(bool succeeded) OVERRIDE { | 215 virtual void Run(bool succeeded) override { |
216 transaction_->BlobWriteComplete(succeeded); | 216 transaction_->BlobWriteComplete(succeeded); |
217 } | 217 } |
218 | 218 |
219 protected: | 219 protected: |
220 virtual ~BlobWriteCallbackImpl() {} | 220 virtual ~BlobWriteCallbackImpl() {} |
221 | 221 |
222 private: | 222 private: |
223 scoped_refptr<IndexedDBTransaction> transaction_; | 223 scoped_refptr<IndexedDBTransaction> transaction_; |
224 }; | 224 }; |
225 | 225 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 base::ASCIIToUTF16("Transaction timed out due to inactivity."))); | 396 base::ASCIIToUTF16("Transaction timed out due to inactivity."))); |
397 } | 397 } |
398 | 398 |
399 void IndexedDBTransaction::CloseOpenCursors() { | 399 void IndexedDBTransaction::CloseOpenCursors() { |
400 for (auto* cursor : open_cursors_) | 400 for (auto* cursor : open_cursors_) |
401 cursor->Close(); | 401 cursor->Close(); |
402 open_cursors_.clear(); | 402 open_cursors_.clear(); |
403 } | 403 } |
404 | 404 |
405 } // namespace content | 405 } // namespace content |
OLD | NEW |