summaryrefslogtreecommitdiffstats
path: root/content/common/indexed_db
diff options
context:
space:
mode:
authoralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-25 19:03:34 +0000
committeralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-25 19:03:34 +0000
commit92ed0e1a885fb97c73002ba1ae847cd4966a980d (patch)
tree8a6e292b5138b5a1e15369f32451cb272f583526 /content/common/indexed_db
parenta40397e7483a2120354343f0a41e1f5eb90c0ee9 (diff)
downloadchromium_src-92ed0e1a885fb97c73002ba1ae847cd4966a980d.zip
chromium_src-92ed0e1a885fb97c73002ba1ae847cd4966a980d.tar.gz
chromium_src-92ed0e1a885fb97c73002ba1ae847cd4966a980d.tar.bz2
Remove WebSecurityOrigin from chromium
This is part 2 of 3. WebFrame and WebSecurityOrigin is now gone from the backend. BUG=233361 Review URL: https://codereview.chromium.org/14156007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/indexed_db')
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.cc39
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.h17
-rw-r--r--content/common/indexed_db/indexed_db_messages.h12
-rw-r--r--content/common/indexed_db/proxy_webidbfactory_impl.cc17
-rw-r--r--content/common/indexed_db/proxy_webidbfactory_impl.h10
5 files changed, 24 insertions, 71 deletions
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index 76db9f1..cfa3de3 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -242,35 +242,10 @@ void IndexedDBDispatcher::RequestIDBCursorDelete(
void IndexedDBDispatcher::RequestIDBFactoryOpen(
const string16& name,
int64 version,
- WebIDBCallbacks* callbacks_ptr,
- WebIDBDatabaseCallbacks* database_callbacks_ptr,
- const string16& origin,
- WebFrame* web_frame) {
- ResetCursorPrefetchCaches();
- scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
- scoped_ptr<WebIDBDatabaseCallbacks>
- database_callbacks(database_callbacks_ptr);
-
- IndexedDBHostMsg_FactoryOpen_Params params;
- params.ipc_thread_id = CurrentWorkerId();
- params.ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
- params.ipc_database_callbacks_id = pending_database_callbacks_.Add(
- database_callbacks.release());
- params.origin = origin;
- params.name = name;
- params.transaction_id = 0;
- params.version = version;
- Send(new IndexedDBHostMsg_FactoryOpen(params));
-}
-
-void IndexedDBDispatcher::RequestIDBFactoryOpen(
- const string16& name,
- int64 version,
int64 transaction_id,
WebIDBCallbacks* callbacks_ptr,
WebIDBDatabaseCallbacks* database_callbacks_ptr,
- const string16& origin,
- WebFrame* web_frame) {
+ const string16& database_identifier) {
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
scoped_ptr<WebIDBDatabaseCallbacks>
@@ -281,7 +256,7 @@ void IndexedDBDispatcher::RequestIDBFactoryOpen(
params.ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
params.ipc_database_callbacks_id = pending_database_callbacks_.Add(
database_callbacks.release());
- params.origin = origin;
+ params.database_identifier = database_identifier;
params.name = name;
params.transaction_id = transaction_id;
params.version = version;
@@ -290,30 +265,28 @@ void IndexedDBDispatcher::RequestIDBFactoryOpen(
void IndexedDBDispatcher::RequestIDBFactoryGetDatabaseNames(
WebIDBCallbacks* callbacks_ptr,
- const string16& origin,
- WebFrame* web_frame) {
+ const string16& database_identifier) {
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
IndexedDBHostMsg_FactoryGetDatabaseNames_Params params;
params.ipc_thread_id = CurrentWorkerId();
params.ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
- params.origin = origin;
+ params.database_identifier = database_identifier;
Send(new IndexedDBHostMsg_FactoryGetDatabaseNames(params));
}
void IndexedDBDispatcher::RequestIDBFactoryDeleteDatabase(
const string16& name,
WebIDBCallbacks* callbacks_ptr,
- const string16& origin,
- WebFrame* web_frame) {
+ const string16& database_identifier) {
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
IndexedDBHostMsg_FactoryDeleteDatabase_Params params;
params.ipc_thread_id = CurrentWorkerId();
params.ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
- params.origin = origin;
+ params.database_identifier = database_identifier;
params.name = name;
Send(new IndexedDBHostMsg_FactoryDeleteDatabase(params));
}
diff --git a/content/common/indexed_db/indexed_db_dispatcher.h b/content/common/indexed_db/indexed_db_dispatcher.h
index a92259b..5e804fa 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.h
+++ b/content/common/indexed_db/indexed_db_dispatcher.h
@@ -63,16 +63,7 @@ class CONTENT_EXPORT IndexedDBDispatcher
void RequestIDBFactoryGetDatabaseNames(
WebKit::WebIDBCallbacks* callbacks,
- const string16& origin,
- WebKit::WebFrame* web_frame);
-
- void RequestIDBFactoryOpen(
- const string16& name,
- int64 version,
- WebKit::WebIDBCallbacks* callbacks,
- WebKit::WebIDBDatabaseCallbacks* database_callbacks,
- const string16& origin,
- WebKit::WebFrame* web_frame);
+ const string16& database_identifier);
void RequestIDBFactoryOpen(
const string16& name,
@@ -80,14 +71,12 @@ class CONTENT_EXPORT IndexedDBDispatcher
int64 transaction_id,
WebKit::WebIDBCallbacks* callbacks,
WebKit::WebIDBDatabaseCallbacks* database_callbacks,
- const string16& origin,
- WebKit::WebFrame* web_frame);
+ const string16& database_identifier);
void RequestIDBFactoryDeleteDatabase(
const string16& name,
WebKit::WebIDBCallbacks* callbacks,
- const string16& origin,
- WebKit::WebFrame* web_frame);
+ const string16& database_identifier);
void RequestIDBCursorAdvance(
unsigned long count,
diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h
index 2d4d4ce..fa9f9dd 100644
--- a/content/common/indexed_db/indexed_db_messages.h
+++ b/content/common/indexed_db/indexed_db_messages.h
@@ -29,8 +29,8 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params)
// The response should have these ids.
IPC_STRUCT_MEMBER(int32, ipc_thread_id)
IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
- // The origin doing the initiating.
- IPC_STRUCT_MEMBER(string16, origin)
+ // The string id of the origin doing the initiating.
+ IPC_STRUCT_MEMBER(string16, database_identifier)
IPC_STRUCT_END()
// Used to open an indexed database.
@@ -41,8 +41,8 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryOpen_Params)
IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
// Identifier for database callbacks
IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id)
- // The origin doing the initiating.
- IPC_STRUCT_MEMBER(string16, origin)
+ // The string id of the origin doing the initiating.
+ IPC_STRUCT_MEMBER(string16, database_identifier)
// The name of the database.
IPC_STRUCT_MEMBER(string16, name)
// The transaction id used if a database upgrade is needed.
@@ -56,8 +56,8 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryDeleteDatabase_Params)
// The response should have these ids.
IPC_STRUCT_MEMBER(int32, ipc_thread_id)
IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
- // The origin doing the initiating.
- IPC_STRUCT_MEMBER(string16, origin)
+ // The string id of the origin doing the initiating.
+ IPC_STRUCT_MEMBER(string16, database_identifier)
// The name of the database.
IPC_STRUCT_MEMBER(string16, name)
IPC_STRUCT_END()
diff --git a/content/common/indexed_db/proxy_webidbfactory_impl.cc b/content/common/indexed_db/proxy_webidbfactory_impl.cc
index d6a0bec..c9376e99 100644
--- a/content/common/indexed_db/proxy_webidbfactory_impl.cc
+++ b/content/common/indexed_db/proxy_webidbfactory_impl.cc
@@ -12,7 +12,6 @@ using WebKit::WebFrame;
using WebKit::WebIDBCallbacks;
using WebKit::WebIDBDatabase;
using WebKit::WebIDBDatabaseCallbacks;
-using WebKit::WebSecurityOrigin;
using WebKit::WebString;
namespace content {
@@ -25,13 +24,12 @@ RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() {
void RendererWebIDBFactoryImpl::getDatabaseNames(
WebIDBCallbacks* callbacks,
- const WebSecurityOrigin& origin,
- WebFrame* web_frame,
+ const WebString& database_identifier,
const WebString& data_dir_unused) {
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance();
dispatcher->RequestIDBFactoryGetDatabaseNames(
- callbacks, origin.databaseIdentifier(), web_frame);
+ callbacks, database_identifier);
}
void RendererWebIDBFactoryImpl::open(
@@ -40,8 +38,7 @@ void RendererWebIDBFactoryImpl::open(
long long transaction_id,
WebIDBCallbacks* callbacks,
WebIDBDatabaseCallbacks* database_callbacks,
- const WebSecurityOrigin& origin,
- WebFrame* web_frame,
+ const WebString& database_identifier,
const WebString& data_dir) {
// Don't send the data_dir. We know what we want on the Browser side of
// things.
@@ -49,22 +46,20 @@ void RendererWebIDBFactoryImpl::open(
IndexedDBDispatcher::ThreadSpecificInstance();
dispatcher->RequestIDBFactoryOpen(
name, version, transaction_id, callbacks, database_callbacks,
- origin.databaseIdentifier(),
- web_frame);
+ database_identifier);
}
void RendererWebIDBFactoryImpl::deleteDatabase(
const WebString& name,
WebIDBCallbacks* callbacks,
- const WebSecurityOrigin& origin,
- WebFrame* web_frame,
+ const WebString& database_identifier,
const WebString& data_dir) {
// Don't send the data_dir. We know what we want on the Browser side of
// things.
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance();
dispatcher->RequestIDBFactoryDeleteDatabase(
- name, callbacks, origin.databaseIdentifier(), web_frame);
+ name, callbacks, database_identifier);
}
} // namespace content
diff --git a/content/common/indexed_db/proxy_webidbfactory_impl.h b/content/common/indexed_db/proxy_webidbfactory_impl.h
index 369decd..f6f03fd 100644
--- a/content/common/indexed_db/proxy_webidbfactory_impl.h
+++ b/content/common/indexed_db/proxy_webidbfactory_impl.h
@@ -12,7 +12,6 @@
namespace WebKit {
class WebFrame;
-class WebSecurityOrigin;
class WebString;
}
@@ -26,8 +25,7 @@ class RendererWebIDBFactoryImpl : public WebKit::WebIDBFactory {
// See WebIDBFactory.h for documentation on these functions.
virtual void getDatabaseNames(
WebKit::WebIDBCallbacks* callbacks,
- const WebKit::WebSecurityOrigin& origin,
- WebKit::WebFrame* web_frame,
+ const WebKit::WebString& database_identifier,
const WebKit::WebString& data_dir);
virtual void open(
const WebKit::WebString& name,
@@ -35,14 +33,12 @@ class RendererWebIDBFactoryImpl : public WebKit::WebIDBFactory {
long long transaction_id,
WebKit::WebIDBCallbacks* callbacks,
WebKit::WebIDBDatabaseCallbacks* databaseCallbacks,
- const WebKit::WebSecurityOrigin& origin,
- WebKit::WebFrame* web_frame,
+ const WebKit::WebString& database_identifier,
const WebKit::WebString& data_dir);
virtual void deleteDatabase(
const WebKit::WebString& name,
WebKit::WebIDBCallbacks* callbacks,
- const WebKit::WebSecurityOrigin& origin,
- WebKit::WebFrame* web_frame,
+ const WebKit::WebString& database_identifier,
const WebKit::WebString& data_dir);
};