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

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

Issue 240003011: Add blob-writing functionality [as yet un-called] to IDB's backend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned branch 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/indexed_db/indexed_db_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_fake_backing_store.h" 5 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore() 12 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore()
13 : IndexedDBBackingStore(NULL, 13 : IndexedDBBackingStore(NULL,
14 GURL("http://localhost:81"), 14 GURL("http://localhost:81"),
15 base::FilePath(), 15 base::FilePath(),
16 NULL,
16 scoped_ptr<LevelDBDatabase>(), 17 scoped_ptr<LevelDBDatabase>(),
17 scoped_ptr<LevelDBComparator>(), 18 scoped_ptr<LevelDBComparator>(),
18 NULL) {} 19 NULL) {}
19 20
20 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore( 21 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore(
21 IndexedDBFactory* factory, 22 IndexedDBFactory* factory,
22 base::TaskRunner* task_runner) 23 base::TaskRunner* task_runner)
23 : IndexedDBBackingStore(factory, 24 : IndexedDBBackingStore(factory,
24 GURL("http://localhost:81"), 25 GURL("http://localhost:81"),
25 base::FilePath(), 26 base::FilePath(),
27 NULL,
26 scoped_ptr<LevelDBDatabase>(), 28 scoped_ptr<LevelDBDatabase>(),
27 scoped_ptr<LevelDBComparator>(), 29 scoped_ptr<LevelDBComparator>(),
28 task_runner) {} 30 task_runner) {}
29 31
30 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} 32 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {}
31 33
32 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames( 34 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames(
33 leveldb::Status* s) { 35 leveldb::Status* s) {
34 *s = leveldb::Status::OK(); 36 *s = leveldb::Status::OK();
35 return std::vector<base::string16>(); 37 return std::vector<base::string16>();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {} 187 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {}
186 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::Commit() { 188 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::Commit() {
187 if (result_) 189 if (result_)
188 return leveldb::Status::OK(); 190 return leveldb::Status::OK();
189 else 191 else
190 return leveldb::Status::IOError("test error"); 192 return leveldb::Status::IOError("test error");
191 } 193 }
192 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} 194 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {}
193 195
194 } // namespace content 196 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698