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

Unified Diff: content/child/db_message_filter.cc

Issue 1779413002: Remove Blink's DatabaseIdentifier implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded include Created 4 years, 9 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/blink_platform_impl.cc ('k') | content/child/web_database_observer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/db_message_filter.cc
diff --git a/content/child/db_message_filter.cc b/content/child/db_message_filter.cc
index 9bd9af4d08bf74b27408b80e46b8a83bc1f9aacb..9e65a38fc054c7694cb188746a87e9ae55eeb8d4 100644
--- a/content/child/db_message_filter.cc
+++ b/content/child/db_message_filter.cc
@@ -5,13 +5,28 @@
#include "content/child/db_message_filter.h"
#include "content/common/database_messages.h"
+#include "storage/common/database/database_identifier.h"
+#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "third_party/WebKit/public/platform/WebString.h"
+#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebDatabase.h"
+using blink::WebSecurityOrigin;
using blink::WebString;
namespace content {
+namespace {
+
+// TODO(jsbell): Pass url::Origin over IPC instead of database identifier/GURL.
+// https://crbug.com/591482
+WebSecurityOrigin OriginFromIdentifier(const std::string& identifier) {
+ return WebSecurityOrigin::create(
+ storage::GetOriginFromIdentifier(identifier));
+}
+
+} // namespace
+
DBMessageFilter::DBMessageFilter() {
}
@@ -34,27 +49,27 @@ void DBMessageFilter::OnDatabaseUpdateSize(const std::string& origin_identifier,
const base::string16& database_name,
int64_t database_size) {
blink::WebDatabase::updateDatabaseSize(
- WebString::fromUTF8(origin_identifier), database_name, database_size);
+ OriginFromIdentifier(origin_identifier), database_name, database_size);
}
void DBMessageFilter::OnDatabaseUpdateSpaceAvailable(
const std::string& origin_identifier,
int64_t space_available) {
blink::WebDatabase::updateSpaceAvailable(
- WebString::fromUTF8(origin_identifier), space_available);
+ OriginFromIdentifier(origin_identifier), space_available);
}
void DBMessageFilter::OnDatabaseResetSpaceAvailable(
const std::string& origin_identifier) {
blink::WebDatabase::resetSpaceAvailable(
- WebString::fromUTF8(origin_identifier));
+ OriginFromIdentifier(origin_identifier));
}
void DBMessageFilter::OnDatabaseCloseImmediately(
const std::string& origin_identifier,
const base::string16& database_name) {
blink::WebDatabase::closeDatabaseImmediately(
- WebString::fromUTF8(origin_identifier), database_name);
+ OriginFromIdentifier(origin_identifier), database_name);
}
} // namespace content
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/web_database_observer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698