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

Unified Diff: content/browser/in_process_webkit/indexed_db_callbacks.cc

Issue 17033004: Tell IDB frontend about data loss (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ToT 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/in_process_webkit/indexed_db_callbacks.cc
diff --git a/content/browser/in_process_webkit/indexed_db_callbacks.cc b/content/browser/in_process_webkit/indexed_db_callbacks.cc
index 32f07089307f3ffbe92fefdd11826f329e9f8c14..f6eda3b2d8c303691ccf8d7062da276e8c1d5eeb 100644
--- a/content/browser/in_process_webkit/indexed_db_callbacks.cc
+++ b/content/browser/in_process_webkit/indexed_db_callbacks.cc
@@ -13,6 +13,7 @@
#include "webkit/browser/quota/quota_manager.h"
using WebKit::WebData;
+using WebKit::WebIDBCallbacks;
using WebKit::WebString;
namespace content {
@@ -51,9 +52,11 @@ void IndexedDBCallbacksBase::onSuccess(
NOTREACHED();
}
-void IndexedDBCallbacksBase::onUpgradeNeeded(long long old_version,
- WebIDBDatabaseImpl* database,
- const IndexedDBDatabaseMetadata&) {
+void IndexedDBCallbacksBase::onUpgradeNeeded(
+ long long old_version,
+ WebIDBDatabaseImpl* database,
+ const IndexedDBDatabaseMetadata& /*metadata*/,
+ WebKit::WebIDBCallbacks::DataLoss data_loss) {
NOTREACHED();
}
@@ -133,7 +136,8 @@ void IndexedDBCallbacksDatabase::onSuccess(
void IndexedDBCallbacksDatabase::onUpgradeNeeded(
long long old_version,
WebIDBDatabaseImpl* database,
- const IndexedDBDatabaseMetadata& metadata) {
+ const IndexedDBDatabaseMetadata& metadata,
+ WebIDBCallbacks::DataLoss data_loss) {
dispatcher_host()->RegisterTransactionId(host_transaction_id_, origin_url_);
int32 ipc_database_id =
dispatcher_host()->Add(database, ipc_thread_id(), origin_url_);
@@ -145,6 +149,7 @@ void IndexedDBCallbacksDatabase::onUpgradeNeeded(
params.ipc_database_callbacks_id = ipc_database_callbacks_id_;
params.old_version = old_version;
params.idb_metadata = IndexedDBDispatcherHost::ConvertMetadata(metadata);
+ params.data_loss = data_loss;
dispatcher_host()->Send(new IndexedDBMsg_CallbacksUpgradeNeeded(params));
}
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_callbacks.h ('k') | content/browser/indexed_db/indexed_db_backing_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698