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

Unified Diff: content/browser/indexed_db/indexed_db_fake_backing_store.cc

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged out--bot failed due to staleness. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_fake_backing_store.cc
diff --git a/content/browser/indexed_db/indexed_db_fake_backing_store.cc b/content/browser/indexed_db/indexed_db_fake_backing_store.cc
index c77a691fe2e429a6e8806df7c46f66e537b79426..461c0808c60e120f28e0a5bc1687726ca78c77f5 100644
--- a/content/browser/indexed_db/indexed_db_fake_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_fake_backing_store.cc
@@ -10,25 +10,25 @@
namespace content {
IndexedDBFakeBackingStore::IndexedDBFakeBackingStore()
- : IndexedDBBackingStore(NULL,
+ : IndexedDBBackingStore(NULL /* indexed_db_factory */,
GURL("http://localhost:81"),
base::FilePath(),
- NULL,
+ NULL /* request_context */,
scoped_ptr<LevelDBDatabase>(),
scoped_ptr<LevelDBComparator>(),
- NULL) {}
-
+ NULL /* task_runner */) {
+}
IndexedDBFakeBackingStore::IndexedDBFakeBackingStore(
IndexedDBFactory* factory,
base::TaskRunner* task_runner)
: IndexedDBBackingStore(factory,
GURL("http://localhost:81"),
base::FilePath(),
- NULL,
+ NULL /* request_context */,
scoped_ptr<LevelDBDatabase>(),
scoped_ptr<LevelDBComparator>(),
- task_runner) {}
-
+ task_runner) {
+}
IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {}
std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames(
@@ -200,14 +200,18 @@ IndexedDBFakeBackingStore::OpenIndexCursor(
return scoped_ptr<IndexedDBBackingStore::Cursor>();
}
-IndexedDBFakeBackingStore::FakeTransaction::FakeTransaction(bool result)
- : IndexedDBBackingStore::Transaction(NULL), result_(result) {}
+IndexedDBFakeBackingStore::FakeTransaction::FakeTransaction(
+ leveldb::Status result)
+ : IndexedDBBackingStore::Transaction(NULL), result_(result) {
+}
void IndexedDBFakeBackingStore::FakeTransaction::Begin() {}
-leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::Commit() {
- if (result_)
- return leveldb::Status::OK();
- else
- return leveldb::Status::IOError("test error");
+leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseOne(
+ scoped_refptr<BlobWriteCallback> callback) {
+ callback->Run(true);
+ return leveldb::Status::OK();
+}
+leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseTwo() {
+ return result_;
}
void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {}
« no previous file with comments | « content/browser/indexed_db/indexed_db_fake_backing_store.h ('k') | content/browser/indexed_db/indexed_db_leveldb_coding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698