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

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: Yet still more build fixes. 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 6773d1bba5d6437506d01422f1856f57a91da069..57d507af492ca002a4b756e26628de8bf6d6cd88 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(
@@ -193,14 +193,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() {}

Powered by Google App Engine
This is Rietveld 408576698