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

Unified Diff: public/platform/WebIDBCallbacks.h

Issue 67463006: IndexedDB: Simplify WebIDBCallbacks exports, strip IDBFactoryBackend (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-up Created 7 years, 1 month 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
« no previous file with comments | « Source/web/web.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebIDBCallbacks.h
diff --git a/public/platform/WebIDBCallbacks.h b/public/platform/WebIDBCallbacks.h
index f9b4998fbf25acd86d5604faf37015abeea35f16..75d887e920ba5ba5f032fa3b0100c48bf77ba1e3 100644
--- a/public/platform/WebIDBCallbacks.h
+++ b/public/platform/WebIDBCallbacks.h
@@ -27,19 +27,9 @@
#define WebIDBCallbacks_h
#include "WebCommon.h"
-#include "WebIDBTypes.h"
-#include "WebPrivatePtr.h"
#include "WebString.h"
#include "WebVector.h"
-#if BLINK_IMPLEMENTATION
-#include "wtf/PassRefPtr.h"
-#endif
-
-namespace WebCore {
-class IDBRequest;
-}
-
namespace blink {
class WebData;
@@ -51,40 +41,23 @@ class WebIDBKey;
class WebIDBKeyPath;
struct WebIDBMetadata;
-class BLINK_EXPORT WebIDBCallbacks {
+class WebIDBCallbacks {
public:
-#if BLINK_IMPLEMENTATION
- explicit WebIDBCallbacks(PassRefPtr<WebCore::IDBRequest>);
-#endif
-
- WebIDBCallbacks() { }
- virtual ~WebIDBCallbacks();
-
- // FIXME: Remove once callers use the WebIDBDataLoss enum.
- enum DataLoss {
- DataLossNone = WebIDBDataLossNone,
- DataLossTotal = WebIDBDataLossTotal
- };
-
- // For classes that follow the PImpl pattern, pass a const reference.
- // For the rest, pass ownership to the callee via a pointer.
- virtual void onError(const WebIDBDatabaseError&);
- virtual void onSuccess(const WebVector<WebString>&);
- virtual void onSuccess(WebIDBCursor*, const WebIDBKey&, const WebIDBKey& primaryKey, const WebData&);
- virtual void onSuccess(WebIDBDatabase*, const WebIDBMetadata&);
- virtual void onSuccess(const WebIDBKey&);
- virtual void onSuccess(const WebData&);
- virtual void onSuccess(const WebData&, const WebIDBKey&, const WebIDBKeyPath&);
- virtual void onSuccess(long long);
- virtual void onSuccess();
- virtual void onSuccess(const WebIDBKey&, const WebIDBKey& primaryKey, const WebData&);
- virtual void onBlocked(long long oldVersion);
- virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const WebIDBMetadata&, unsigned short dataLoss, WebString dataLossMessage);
+ virtual ~WebIDBCallbacks() { }
-private:
- WebPrivatePtr<WebCore::IDBRequest> m_private;
- // FIXME: Eliminate this flag by having Chromium call onSuccess() with null.
- bool m_upgradeNeededCalled;
+ // Pointers transfer ownership.
+ virtual void onError(const WebIDBDatabaseError&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(const WebVector<WebString>&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBCursor*, const WebIDBKey&, const WebIDBKey& primaryKey, const WebData&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBDatabase*, const WebIDBMetadata&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(const WebIDBKey&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(const WebData&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(const WebData&, const WebIDBKey&, const WebIDBKeyPath&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(long long) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess() { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(const WebIDBKey&, const WebIDBKey& primaryKey, const WebData&) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onBlocked(long long oldVersion) { BLINK_ASSERT_NOT_REACHED(); }
+ virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const WebIDBMetadata&, unsigned short dataLoss, WebString dataLossMessage) { BLINK_ASSERT_NOT_REACHED(); }
};
} // namespace blink
« no previous file with comments | « Source/web/web.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698