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

Unified Diff: content/child/indexed_db/webidbfactory_impl.cc

Issue 1755343002: IndexedDB: Pass origin to platform/IPC, rather than DatabaseIdentifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/child/indexed_db/webidbfactory_impl.cc
diff --git a/content/child/indexed_db/webidbfactory_impl.cc b/content/child/indexed_db/webidbfactory_impl.cc
index 4ed0316ef9982aa2303a9c9d73cb41afe7db7dbb..a296660b19352139773bd8824330e13ee482d0e2 100644
--- a/content/child/indexed_db/webidbfactory_impl.cc
+++ b/content/child/indexed_db/webidbfactory_impl.cc
@@ -6,12 +6,15 @@
#include "content/child/indexed_db/indexed_db_dispatcher.h"
#include "content/child/thread_safe_sender.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebCString.h"
+#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "third_party/WebKit/public/platform/WebString.h"
using blink::WebIDBCallbacks;
using blink::WebIDBDatabase;
using blink::WebIDBDatabaseCallbacks;
+using blink::WebSecurityOrigin;
using blink::WebString;
namespace content {
@@ -22,11 +25,11 @@ WebIDBFactoryImpl::WebIDBFactoryImpl(ThreadSafeSender* thread_safe_sender)
WebIDBFactoryImpl::~WebIDBFactoryImpl() {}
void WebIDBFactoryImpl::getDatabaseNames(WebIDBCallbacks* callbacks,
- const WebString& database_identifier) {
+ const WebSecurityOrigin& origin) {
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
- dispatcher->RequestIDBFactoryGetDatabaseNames(callbacks,
- database_identifier.utf8());
+ dispatcher->RequestIDBFactoryGetDatabaseNames(
+ callbacks, blink::WebStringToGURL(origin.toString()));
}
void WebIDBFactoryImpl::open(const WebString& name,
@@ -34,24 +37,21 @@ void WebIDBFactoryImpl::open(const WebString& name,
long long transaction_id,
WebIDBCallbacks* callbacks,
WebIDBDatabaseCallbacks* database_callbacks,
- const WebString& database_identifier) {
+ const WebSecurityOrigin& origin) {
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
- dispatcher->RequestIDBFactoryOpen(name,
- version,
- transaction_id,
- callbacks,
+ dispatcher->RequestIDBFactoryOpen(name, version, transaction_id, callbacks,
database_callbacks,
- database_identifier.utf8());
+ blink::WebStringToGURL(origin.toString()));
}
void WebIDBFactoryImpl::deleteDatabase(const WebString& name,
WebIDBCallbacks* callbacks,
- const WebString& database_identifier) {
+ const WebSecurityOrigin& origin) {
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
dispatcher->RequestIDBFactoryDeleteDatabase(
- name, callbacks, database_identifier.utf8());
+ name, callbacks, blink::WebStringToGURL(origin.toString()));
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698