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

Unified Diff: content/child/web_database_observer_impl.cc

Issue 1832473002: WebSQL: Use url::Origin rather than database identifiers for IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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 | « content/child/db_message_filter.cc ('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/child/web_database_observer_impl.cc
diff --git a/content/child/web_database_observer_impl.cc b/content/child/web_database_observer_impl.cc
index 368e0a56fc211c6170d53c52d3df78dbd025cd56..bddc9e1f18a790f158044747bfbc50d518a41d38 100644
--- a/content/child/web_database_observer_impl.cc
+++ b/content/child/web_database_observer_impl.cc
@@ -81,27 +81,26 @@ void WebDatabaseObserverImpl::databaseOpened(
const WebString& database_name,
const WebString& database_display_name,
unsigned long estimated_size) {
- const std::string origin_identifier = GetIdentifierFromOrigin(origin);
- open_connections_->AddOpenConnection(origin_identifier, database_name);
+ open_connections_->AddOpenConnection(GetIdentifierFromOrigin(origin),
+ database_name);
sender_->Send(new DatabaseHostMsg_Opened(
- origin_identifier, database_name, database_display_name, estimated_size));
+ origin, database_name, database_display_name, estimated_size));
}
void WebDatabaseObserverImpl::databaseModified(const WebSecurityOrigin& origin,
const WebString& database_name) {
- sender_->Send(new DatabaseHostMsg_Modified(GetIdentifierFromOrigin(origin),
- database_name));
+ sender_->Send(new DatabaseHostMsg_Modified(origin, database_name));
}
void WebDatabaseObserverImpl::databaseClosed(const WebSecurityOrigin& origin,
const WebString& database_name) {
DCHECK(!main_thread_task_runner_->RunsTasksOnCurrentThread());
- const std::string origin_identifier = GetIdentifierFromOrigin(origin);
main_thread_task_runner_->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&IPC::SyncMessageFilter::Send), sender_,
- new DatabaseHostMsg_Closed(origin_identifier, database_name)));
- open_connections_->RemoveOpenConnection(origin_identifier, database_name);
+ new DatabaseHostMsg_Closed(origin, database_name)));
+ open_connections_->RemoveOpenConnection(GetIdentifierFromOrigin(origin),
+ database_name);
}
void WebDatabaseObserverImpl::reportOpenDatabaseResult(
@@ -191,8 +190,8 @@ void WebDatabaseObserverImpl::HandleSqliteError(const WebSecurityOrigin& origin,
// a unnecessary ipc traffic, this method can get called at a fairly
// high frequency (per-sqlstatement).
if (error == SQLITE_CORRUPT || error == SQLITE_NOTADB) {
- sender_->Send(new DatabaseHostMsg_HandleSqliteError(
- GetIdentifierFromOrigin(origin), database_name, error));
+ sender_->Send(
+ new DatabaseHostMsg_HandleSqliteError(origin, database_name, error));
}
}
« no previous file with comments | « content/child/db_message_filter.cc ('k') | content/common/database_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698