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

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

Issue 203833003: Add the IndexedDBActiveBlobRegistry, currently unused, to enable future blob (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix override mismatch Created 6 years, 8 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
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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore()
12 : IndexedDBBackingStore(NULL,
13 GURL("http://localhost:81"),
14 scoped_ptr<LevelDBDatabase>(),
15 scoped_ptr<LevelDBComparator>(),
16 NULL) {}
17
18 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore(
19 IndexedDBFactory* factory,
20 base::TaskRunner* task_runner)
21 : IndexedDBBackingStore(factory,
22 GURL("http://localhost:81"),
23 scoped_ptr<LevelDBDatabase>(),
24 scoped_ptr<LevelDBComparator>(),
25 task_runner) {}
26
11 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} 27 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {}
12 28
13 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames() { 29 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames() {
14 return std::vector<base::string16>(); 30 return std::vector<base::string16>();
15 } 31 }
16 leveldb::Status IndexedDBFakeBackingStore::GetIDBDatabaseMetaData( 32 leveldb::Status IndexedDBFakeBackingStore::GetIDBDatabaseMetaData(
17 const base::string16& name, 33 const base::string16& name,
18 IndexedDBDatabaseMetadata*, 34 IndexedDBDatabaseMetadata*,
19 bool* found) { 35 bool* found) {
20 return leveldb::Status::OK(); 36 return leveldb::Status::OK();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 leveldb::Status IndexedDBFakeBackingStore::PutIndexDataForRecord( 122 leveldb::Status IndexedDBFakeBackingStore::PutIndexDataForRecord(
107 Transaction*, 123 Transaction*,
108 int64 database_id, 124 int64 database_id,
109 int64 object_store_id, 125 int64 object_store_id,
110 int64 index_id, 126 int64 index_id,
111 const IndexedDBKey&, 127 const IndexedDBKey&,
112 const RecordIdentifier&) { 128 const RecordIdentifier&) {
113 return leveldb::Status::IOError("test error"); 129 return leveldb::Status::IOError("test error");
114 } 130 }
115 131
132 void IndexedDBFakeBackingStore::ReportBlobUnused(int64 database_id,
133 int64 blob_key) {}
134
116 scoped_ptr<IndexedDBBackingStore::Cursor> 135 scoped_ptr<IndexedDBBackingStore::Cursor>
117 IndexedDBFakeBackingStore::OpenObjectStoreKeyCursor( 136 IndexedDBFakeBackingStore::OpenObjectStoreKeyCursor(
118 IndexedDBBackingStore::Transaction* transaction, 137 IndexedDBBackingStore::Transaction* transaction,
119 int64 database_id, 138 int64 database_id,
120 int64 object_store_id, 139 int64 object_store_id,
121 const IndexedDBKeyRange& key_range, 140 const IndexedDBKeyRange& key_range,
122 indexed_db::CursorDirection) { 141 indexed_db::CursorDirection) {
123 return scoped_ptr<IndexedDBBackingStore::Cursor>(); 142 return scoped_ptr<IndexedDBBackingStore::Cursor>();
124 } 143 }
125 scoped_ptr<IndexedDBBackingStore::Cursor> 144 scoped_ptr<IndexedDBBackingStore::Cursor>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {} 176 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {}
158 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::Commit() { 177 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::Commit() {
159 if (result_) 178 if (result_)
160 return leveldb::Status::OK(); 179 return leveldb::Status::OK();
161 else 180 else
162 return leveldb::Status::IOError("test error"); 181 return leveldb::Status::IOError("test error");
163 } 182 }
164 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} 183 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {}
165 184
166 } // namespace content 185 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_fake_backing_store.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698