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

Unified Diff: content/browser/renderer_host/database_message_filter.cc

Issue 9371008: Nuke from orbit corrupt websql databases. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « content/browser/renderer_host/database_message_filter.h ('k') | content/common/database_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/database_message_filter.cc
===================================================================
--- content/browser/renderer_host/database_message_filter.cc (revision 122554)
+++ content/browser/renderer_host/database_message_filter.cc (working copy)
@@ -109,6 +109,7 @@
IPC_MESSAGE_HANDLER(DatabaseHostMsg_Opened, OnDatabaseOpened)
IPC_MESSAGE_HANDLER(DatabaseHostMsg_Modified, OnDatabaseModified)
IPC_MESSAGE_HANDLER(DatabaseHostMsg_Closed, OnDatabaseClosed)
+ IPC_MESSAGE_HANDLER(DatabaseHostMsg_HandleSqliteError, OnHandleSqliteError)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
return handled;
@@ -159,7 +160,6 @@
// process. The original handle is closed, unless we saved it in the
// database tracker.
bool auto_close = !db_tracker_->HasSavedIncognitoFileHandle(vfs_file_name);
- DCHECK_NE(base::kInvalidPlatformFileValue, file_handle);
IPC::PlatformFileForTransit target_handle =
IPC::GetFileHandleForProcess(file_handle, peer_handle(), auto_close);
@@ -322,6 +322,14 @@
db_tracker_->DatabaseClosed(origin_identifier, database_name);
}
+void DatabaseMessageFilter::OnHandleSqliteError(
+ const string16& origin_identifier,
+ const string16& database_name,
+ int error) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ db_tracker_->HandleSqliteError(origin_identifier, database_name, error);
+}
+
void DatabaseMessageFilter::OnDatabaseSizeChanged(
const string16& origin_identifier,
const string16& database_name,
« no previous file with comments | « content/browser/renderer_host/database_message_filter.h ('k') | content/common/database_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698