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

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

Issue 18224002: IndexedDB: Eliminate IndexedDBDatabaseCallbacksWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fix for win 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_callbacks.h
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.h b/content/browser/indexed_db/indexed_db_database_callbacks.h
index 3a8b684b686c387de029cbb7aefd317d266daa42..7c750e414c4cc89691b9750b84dd3db82ccc5d55 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.h
@@ -5,27 +5,43 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_
+#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
namespace content {
class IndexedDBDatabaseError;
class IndexedDBDispatcherHost;
-class IndexedDBDatabaseCallbacks {
+class CONTENT_EXPORT IndexedDBDatabaseCallbacks
+ : public base::RefCounted<IndexedDBDatabaseCallbacks> {
public:
- IndexedDBDatabaseCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int ipc_thread_id,
- int ipc_database_callbacks_id);
+ static scoped_refptr<IndexedDBDatabaseCallbacks> Create(
+ IndexedDBDispatcherHost* dispatcher_host,
+ int ipc_thread_id,
+ int ipc_database_callbacks_id) {
+ return make_scoped_refptr(
+ new IndexedDBDatabaseCallbacks(
+ dispatcher_host, ipc_thread_id, ipc_database_callbacks_id));
+ }
+
+ virtual void OnForcedClose();
+ virtual void OnVersionChange(int64 old_version, int64 new_version);
+
+ virtual void OnAbort(int64 host_transaction_id,
+ const IndexedDBDatabaseError& error);
+ virtual void OnComplete(int64 host_transaction_id);
+ protected:
+ IndexedDBDatabaseCallbacks(
+ IndexedDBDispatcherHost* dispatcher_host,
+ int ipc_thread_id,
+ int ipc_database_callbacks_id);
virtual ~IndexedDBDatabaseCallbacks();
- virtual void onForcedClose();
- virtual void onVersionChange(long long old_version, long long new_version);
- virtual void onAbort(long long host_transaction_id,
- const IndexedDBDatabaseError& error);
- virtual void onComplete(long long host_transaction_id);
-
private:
+ friend class base::RefCounted<IndexedDBDatabaseCallbacks>;
+
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
int ipc_thread_id_;
int ipc_database_callbacks_id_;
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.cc ('k') | content/browser/indexed_db/indexed_db_database_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698