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

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

Issue 16581002: IndexedDB: Eliminate interfaces for IndexedDB{Factory,Database,Cursor} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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_factory.cc
diff --git a/content/browser/indexed_db/indexed_db_factory_impl.cc b/content/browser/indexed_db/indexed_db_factory.cc
similarity index 84%
rename from content/browser/indexed_db/indexed_db_factory_impl.cc
rename to content/browser/indexed_db/indexed_db_factory.cc
index 5dba7ac3972266663a3f999ec7297694303c78aa..4cbbc9e83a7b2738fae31fe47649d9601db4ab41 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/indexed_db/indexed_db_factory_impl.h"
+#include "content/browser/indexed_db/indexed_db_factory.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
-#include "content/browser/indexed_db/indexed_db_database_impl.h"
+#include "content/browser/indexed_db/indexed_db_database.h"
#include "content/browser/indexed_db/indexed_db_tracing.h"
#include "content/browser/indexed_db/indexed_db_transaction_coordinator.h"
#include "third_party/WebKit/public/platform/WebIDBDatabaseException.h"
@@ -39,41 +39,41 @@ static string16 ComputeUniqueIdentifier(const string16& name,
return ComputeFileIdentifier(database_identifier) + name;
}
-IndexedDBFactoryImpl::IndexedDBFactoryImpl() {}
+IndexedDBFactory::IndexedDBFactory() {}
-IndexedDBFactoryImpl::~IndexedDBFactoryImpl() {}
+IndexedDBFactory::~IndexedDBFactory() {}
-void IndexedDBFactoryImpl::RemoveIDBDatabaseBackend(
+void IndexedDBFactory::RemoveIDBDatabaseBackend(
const string16& unique_identifier) {
DCHECK(database_backend_map_.find(unique_identifier) !=
database_backend_map_.end());
database_backend_map_.erase(unique_identifier);
}
-void IndexedDBFactoryImpl::GetDatabaseNames(
+void IndexedDBFactory::GetDatabaseNames(
scoped_refptr<IndexedDBCallbacksWrapper> callbacks,
const string16& database_identifier,
const base::FilePath& data_directory) {
- IDB_TRACE("IndexedDBFactoryImpl::get_database_names");
+ IDB_TRACE("IndexedDBFactory::get_database_names");
scoped_refptr<IndexedDBBackingStore> backing_store =
OpenBackingStore(database_identifier, data_directory);
if (!backing_store) {
- callbacks->OnError(IndexedDBDatabaseError(
- WebKit::WebIDBDatabaseExceptionUnknownError,
- "Internal error opening backing store for "
- "indexedDB.webkitGetDatabaseNames."));
+ callbacks->OnError(
+ IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError,
+ "Internal error opening backing store for "
+ "indexedDB.webkitGetDatabaseNames."));
return;
}
callbacks->OnSuccess(backing_store->GetDatabaseNames());
}
-void IndexedDBFactoryImpl::DeleteDatabase(
+void IndexedDBFactory::DeleteDatabase(
const string16& name,
scoped_refptr<IndexedDBCallbacksWrapper> callbacks,
const string16& database_identifier,
const base::FilePath& data_directory) {
- IDB_TRACE("IndexedDBFactoryImpl::delete_database");
+ IDB_TRACE("IndexedDBFactory::delete_database");
const string16 unique_identifier =
ComputeUniqueIdentifier(name, database_identifier);
@@ -97,9 +97,8 @@ void IndexedDBFactoryImpl::DeleteDatabase(
return;
}
- scoped_refptr<IndexedDBDatabaseImpl> database_backend =
- IndexedDBDatabaseImpl::Create(
- name, backing_store.get(), this, unique_identifier);
+ scoped_refptr<IndexedDBDatabase> database_backend = IndexedDBDatabase::Create(
+ name, backing_store.get(), this, unique_identifier);
if (!database_backend) {
callbacks->OnError(IndexedDBDatabaseError(
WebKit::WebIDBDatabaseExceptionUnknownError,
@@ -113,7 +112,7 @@ void IndexedDBFactoryImpl::DeleteDatabase(
database_backend_map_.erase(unique_identifier);
}
-scoped_refptr<IndexedDBBackingStore> IndexedDBFactoryImpl::OpenBackingStore(
+scoped_refptr<IndexedDBBackingStore> IndexedDBFactory::OpenBackingStore(
const string16& database_identifier,
const base::FilePath& data_directory) {
const string16 file_identifier = ComputeFileIdentifier(database_identifier);
@@ -149,7 +148,7 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBFactoryImpl::OpenBackingStore(
return 0;
}
-void IndexedDBFactoryImpl::Open(
+void IndexedDBFactory::Open(
const string16& name,
int64 version,
int64 transaction_id,
@@ -157,11 +156,11 @@ void IndexedDBFactoryImpl::Open(
scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks,
const string16& database_identifier,
const base::FilePath& data_directory) {
- IDB_TRACE("IndexedDBFactoryImpl::open");
+ IDB_TRACE("IndexedDBFactory::open");
const string16 unique_identifier =
ComputeUniqueIdentifier(name, database_identifier);
- scoped_refptr<IndexedDBDatabaseImpl> database_backend;
+ scoped_refptr<IndexedDBDatabase> database_backend;
IndexedDBDatabaseMap::iterator it =
database_backend_map_.find(unique_identifier);
if (it == database_backend_map_.end()) {
@@ -175,7 +174,7 @@ void IndexedDBFactoryImpl::Open(
return;
}
- database_backend = IndexedDBDatabaseImpl::Create(
+ database_backend = IndexedDBDatabase::Create(
name, backing_store.get(), this, unique_identifier);
if (!database_backend) {
callbacks->OnError(IndexedDBDatabaseError(
« no previous file with comments | « content/browser/indexed_db/indexed_db_factory.h ('k') | content/browser/indexed_db/indexed_db_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698