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

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

Issue 18221003: Convert WebIDBDatabaseImpl to IndexedDBConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback 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_connection.cc
diff --git a/content/browser/indexed_db/indexed_db_connection.cc b/content/browser/indexed_db/indexed_db_connection.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3f1a0c372174641975c0b0910d050e88acb5d7ec
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_connection.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// 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_connection.h"
+
+namespace content {
+
+IndexedDBConnection::IndexedDBConnection(
+ scoped_refptr<IndexedDBDatabase> database,
+ scoped_refptr<IndexedDBDatabaseCallbacks> callbacks)
+ : database_(database), callbacks_(callbacks) {}
+
+IndexedDBConnection::~IndexedDBConnection() {}
+
+void IndexedDBConnection::Close() {
+ if (!callbacks_)
+ return;
+ database_->Close(this);
+ callbacks_ = NULL;
+}
+
+void IndexedDBConnection::ForceClose() {
+ if (!callbacks_)
+ return;
+ database_->Close(this);
+ callbacks_->OnForcedClose();
+ callbacks_ = NULL;
+}
+
+} // namespace WebKit
« no previous file with comments | « content/browser/indexed_db/indexed_db_connection.h ('k') | content/browser/indexed_db/indexed_db_context_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698