Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_backing_store.h |
| diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h |
| index 00d6678f6df333b87daeb6b430f7466b5d0740c3..acbfa6746cadc6681267f2c85004f91246c111c6 100644 |
| --- a/content/browser/indexed_db/indexed_db_backing_store.h |
| +++ b/content/browser/indexed_db/indexed_db_backing_store.h |
| @@ -19,6 +19,7 @@ |
| #include "base/gtest_prod_util.h" |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/strings/string_piece.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| @@ -90,9 +91,17 @@ class CONTENT_EXPORT IndexedDBBackingStore |
| DISALLOW_COPY_AND_ASSIGN(RecordIdentifier); |
| }; |
| + enum class BlobWriteResult { |
| + FAIILURE_ASYNC, |
|
cmumford
2016/12/01 19:14:50
You have two I's in FAIILURE_ASYNC.
Also clang-fo
dmurph
2016/12/01 21:12:23
Done. I just upload whatever 'git cl format' does.
|
| + SUCCESS_ASYNC, |
| + SUCCESS_SYNC |
| + }; |
| + |
| class BlobWriteCallback : public base::RefCounted<BlobWriteCallback> { |
| public: |
| - virtual void Run(bool succeeded) = 0; |
| + // TODO(dmurph): Make all calls to this method async after measuring |
| + // performance. |
| + virtual leveldb::Status Run(BlobWriteResult result) = 0; |
| protected: |
| friend class base::RefCounted<BlobWriteCallback>; |
| @@ -282,6 +291,8 @@ class CONTENT_EXPORT IndexedDBBackingStore |
| // has been bumped, and journal cleaning should be deferred. |
| bool committing_; |
| + base::WeakPtrFactory<Transaction> ptr_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(Transaction); |
| }; |