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

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

Issue 18221003: Convert WebIDBDatabaseImpl to IndexedDBConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang-format 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.h
diff --git a/content/browser/indexed_db/indexed_db_connection.h b/content/browser/indexed_db/indexed_db_connection.h
new file mode 100644
index 0000000000000000000000000000000000000000..359a53cc0d571e194b30bec5533be0c945bbdc7c
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_connection.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_
+#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_
+
+#include "base/memory/ref_counted.h"
+#include "content/browser/indexed_db/indexed_db_database.h"
+#include "content/browser/indexed_db/indexed_db_database_callbacks.h"
+
+namespace content {
+class IndexedDBCallbacks;
+class IndexedDBDatabaseError;
+
+class CONTENT_EXPORT IndexedDBConnection {
+ public:
+ IndexedDBConnection(scoped_refptr<IndexedDBDatabase> db,
+ scoped_refptr<IndexedDBDatabaseCallbacks> callbacks);
+ virtual ~IndexedDBConnection();
+
+ virtual void ForceClose();
+ virtual void Close();
+
+ IndexedDBDatabase* database() { return database_.get(); }
+ IndexedDBDatabaseCallbacks* callbacks() { return callbacks_; }
dgrogan 2013/07/02 22:01:58 These should be consistent in whether or not they
jsbell 2013/07/02 22:19:24 Done. Also, see follow-up patch https://codereview
+
+ private:
+ // Only NULL in tests.
+ scoped_refptr<IndexedDBDatabase> database_;
+
+ // The database_callbacks_ member is cleared when the connection
dgrogan 2013/07/02 22:01:58 s/database_//
jsbell 2013/07/02 22:19:24 Done.
+ // is closed. (May be NULL in tests.)
+ scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_

Powered by Google App Engine
This is Rietveld 408576698