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

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

Issue 16573003: Remove content/browser dependency on WebKit::WebIDBCallbacks and WebKit::WebIDBDatabaseCallbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix namespace issues 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_database_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index 933a80eef267f436c8be78abc8dfe0472fa7fb10..e78aafeb7659e8a4904c9e959740d89347d1fbb3 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/browser/in_process_webkit/indexed_db_database_callbacks.h"
#include "content/browser/indexed_db/indexed_db.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
#include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h"
@@ -20,9 +21,7 @@
#include "content/browser/indexed_db/indexed_db_transaction.h"
#include "content/browser/indexed_db/webidbdatabase_impl.h"
-using WebKit::WebIDBDatabase;
using WebKit::WebIDBDatabaseError;
-using WebKit::WebIDBDatabaseCallbacks;
namespace content {
@@ -163,29 +162,6 @@ class MockIDBDatabaseCallbacks : public IndexedDBDatabaseCallbacksWrapper {
bool was_abort_called_;
};
-class WebIDBDatabaseCallbacksImpl : public WebIDBDatabaseCallbacks {
- public:
- explicit WebIDBDatabaseCallbacksImpl(
- scoped_refptr<IndexedDBDatabaseCallbacksWrapper> callbacks)
- : callbacks_(callbacks) {}
- virtual ~WebIDBDatabaseCallbacksImpl() {}
-
- virtual void onForcedClose() { callbacks_->OnForcedClose(); }
- virtual void onVersionChange(long long old_version, long long new_version) {
- callbacks_->OnVersionChange(old_version, new_version);
- }
- virtual void onAbort(long long transaction_id,
- const WebIDBDatabaseError& error) {
- callbacks_->OnAbort(transaction_id, IndexedDBDatabaseError(error));
- }
- virtual void onComplete(long long transaction_id) {
- callbacks_->OnComplete(transaction_id);
- }
-
- private:
- scoped_refptr<IndexedDBDatabaseCallbacksWrapper> callbacks_;
-};
-
TEST(IndexedDBDatabaseTest, ForcedClose) {
scoped_refptr<IndexedDBFakeBackingStore> backing_store =
new IndexedDBFakeBackingStore();
@@ -202,15 +178,12 @@ TEST(IndexedDBDatabaseTest, ForcedClose) {
scoped_refptr<MockIDBDatabaseCallbacks> connection =
MockIDBDatabaseCallbacks::Create();
- scoped_refptr<IndexedDBDatabaseCallbacksWrapper> connection_proxy =
- IndexedDBDatabaseCallbacksWrapper::Create(
- new WebIDBDatabaseCallbacksImpl(connection));
- WebIDBDatabaseImpl web_database(backend, connection_proxy);
+ WebIDBDatabaseImpl web_database(backend, connection);
scoped_refptr<MockIDBCallbacks> request = MockIDBCallbacks::Create();
const int64 upgrade_transaction_id = 3;
backend->OpenConnection(request,
- connection_proxy,
+ connection,
upgrade_transaction_id,
IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_callbacks_wrapper.cc ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698