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

Unified Diff: public/platform/WebIDBCallbacks.h

Issue 17060008: Add dataLoss property to IDB's upgradeneeded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add blink API stub for compatibility with and without chromium changes 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
« no previous file with comments | « Source/modules/indexeddb/IDBVersionChangeEvent.idl ('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 d70e5f4e27f857c104247d3c98d7251150258cb5..8bc6f4bb4328959b418ffd49a9bb8004442a210e 100644
--- a/public/platform/WebIDBCallbacks.h
+++ b/public/platform/WebIDBCallbacks.h
@@ -45,6 +45,11 @@ class WebIDBCallbacks {
public:
virtual ~WebIDBCallbacks() { }
+ enum DataLoss {
+ DataLossNone = 0,
+ DataLossTotal = 1
+ };
+
// 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&) { WEBKIT_ASSERT_NOT_REACHED(); }
@@ -61,7 +66,11 @@ public:
// FIXME: Remove the following overload once callers are updated:
virtual void onBlocked() { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onBlocked(long long oldVersion) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const WebIDBMetadata&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata)
+ {
+ onUpgradeNeeded(oldVersion, database, metadata, DataLossNone);
+ }
+ virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const WebIDBMetadata&, DataLoss dataLoss) { WEBKIT_ASSERT_NOT_REACHED(); }
};
} // namespace WebKit
« no previous file with comments | « Source/modules/indexeddb/IDBVersionChangeEvent.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698