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

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

Issue 12035081: IndexedDB: Specify reason when aborting due to quota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 11 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 | « no previous file | content/test/data/indexeddb/quota_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
index 98bce5ddf40c80ad0ebb07fd6d198781db0489f6..eec6fa3b48d0a050d8fcade7f00d27c925a540f7 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -27,6 +27,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCursor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbacks.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseError.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseException.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBMetadata.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h"
@@ -40,6 +42,7 @@ using WebKit::WebExceptionCode;
using WebKit::WebIDBCallbacks;
using WebKit::WebIDBCursor;
using WebKit::WebIDBDatabase;
+using WebKit::WebIDBDatabaseError;
using WebKit::WebIDBIndex;
using WebKit::WebIDBKey;
using WebKit::WebIDBMetadata;
@@ -652,14 +655,13 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCommit(
return;
int64 host_transaction_id = parent_->HostTransactionId(transaction_id);
- // TODO(dgrogan): Tell the page the transaction aborted because of quota.
- // http://crbug.com/113118
// TODO(alecflett) move the map to the parent DispatcherHost (parent_)
if (parent_->Context()->WouldBeOverQuota(
transaction_url_map_[host_transaction_id],
transaction_size_map_[host_transaction_id])) {
- database->abort(host_transaction_id);
- return;
+ database->abort(host_transaction_id, WebIDBDatabaseError(
+ WebKit::WebIDBDatabaseExceptionQuotaError));
+ return;
}
database->commit(host_transaction_id);
« no previous file with comments | « no previous file | content/test/data/indexeddb/quota_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698