diff options
author | alecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-01 01:17:33 +0000 |
---|---|---|
committer | alecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-01 01:17:33 +0000 |
commit | 3e4f077a25c71439fdbdc23ea1d8070e9e28a1e0 (patch) | |
tree | eea200b35225a33b70bb4409fc78b6bf2e6eed24 | |
parent | 0dc47fa7d860fae2b35c5cd01768788a522057c6 (diff) | |
download | chromium_src-3e4f077a25c71439fdbdc23ea1d8070e9e28a1e0.zip chromium_src-3e4f077a25c71439fdbdc23ea1d8070e9e28a1e0.tar.gz chromium_src-3e4f077a25c71439fdbdc23ea1d8070e9e28a1e0.tar.bz2 |
Remove deprecated IPC code for onUpgradeNeeded/onSuccess/metadata
BUG=
Review URL: https://codereview.chromium.org/12129002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180029 0039d316-1c4b-4281-b951-d872f2087c98
10 files changed, 0 insertions, 133 deletions
diff --git a/content/browser/in_process_webkit/indexed_db_callbacks.cc b/content/browser/in_process_webkit/indexed_db_callbacks.cc index d3d74ed..4f7fe94 100644 --- a/content/browser/in_process_webkit/indexed_db_callbacks.cc +++ b/content/browser/in_process_webkit/indexed_db_callbacks.cc @@ -49,22 +49,6 @@ IndexedDBCallbacksDatabase::IndexedDBCallbacksDatabase( } void IndexedDBCallbacksDatabase::onSuccess( - WebKit::WebIDBDatabase* idb_object) { - int32 ipc_object_id = ipc_database_id_; - if (ipc_object_id == kDatabaseNotAdded) { - ipc_object_id = dispatcher_host()->Add(idb_object, ipc_thread_id(), - origin_url_); - } else { - // We already have this database and don't need a new copy of it. - delete idb_object; - } - dispatcher_host()->Send( - new IndexedDBMsg_CallbacksSuccessIDBDatabaseOld(ipc_thread_id(), - ipc_response_id(), - ipc_object_id)); -} - -void IndexedDBCallbacksDatabase::onSuccess( WebKit::WebIDBDatabase* idb_object, const WebKit::WebIDBMetadata& metadata) { int32 ipc_object_id = ipc_database_id_; @@ -87,21 +71,6 @@ void IndexedDBCallbacksDatabase::onSuccess( void IndexedDBCallbacksDatabase::onUpgradeNeeded( long long old_version, - WebKit::WebIDBTransaction*, - WebKit::WebIDBDatabase* database) { - dispatcher_host()->RegisterTransactionId(host_transaction_id_, origin_url_); - int32 ipc_database_id = dispatcher_host()->Add(database, ipc_thread_id(), - origin_url_); - ipc_database_id_ = ipc_database_id; - dispatcher_host()->Send( - new IndexedDBMsg_CallbacksUpgradeNeededOld( - ipc_thread_id(), ipc_response_id(), - ipc_database_id, - old_version)); -} - -void IndexedDBCallbacksDatabase::onUpgradeNeeded( - long long old_version, WebKit::WebIDBDatabase* database, const WebKit::WebIDBMetadata& metadata) { dispatcher_host()->RegisterTransactionId(host_transaction_id_, origin_url_); diff --git a/content/browser/in_process_webkit/indexed_db_callbacks.h b/content/browser/in_process_webkit/indexed_db_callbacks.h index 4e4c976..e80862a 100644 --- a/content/browser/in_process_webkit/indexed_db_callbacks.h +++ b/content/browser/in_process_webkit/indexed_db_callbacks.h @@ -14,7 +14,6 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCursor.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseError.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" namespace content { @@ -59,16 +58,11 @@ class IndexedDBCallbacksDatabase : public IndexedDBCallbacksBase { int64 host_transaction_id, const GURL& origin_url); - virtual void onSuccess(WebKit::WebIDBDatabase* idb_object); virtual void onSuccess( WebKit::WebIDBDatabase* idb_object, const WebKit::WebIDBMetadata& metadata); virtual void onUpgradeNeeded( long long old_version, - WebKit::WebIDBTransaction* transaction, - WebKit::WebIDBDatabase* database); - virtual void onUpgradeNeeded( - long long old_version, WebKit::WebIDBDatabase* database, const WebKit::WebIDBMetadata&); diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc index 42d5247..c5549c8 100644 --- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc +++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc @@ -333,7 +333,6 @@ bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived( bool handled = true; IPC_BEGIN_MESSAGE_MAP_EX(IndexedDBDispatcherHost::DatabaseDispatcherHost, message, *msg_is_ok) - IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseMetadata, OnMetadata) IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseCreateObjectStore, OnCreateObjectStore) IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDeleteObjectStore, @@ -370,16 +369,6 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::Send( parent_->Send(message); } -void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMetadata( - int32 ipc_database_id, IndexedDBDatabaseMetadata* metadata) { - WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( - &map_, ipc_database_id); - if (!idb_database) - return; - - *metadata = ConvertMetadata(idb_database->metadata()); -} - void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateObjectStore( const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.h b/content/browser/in_process_webkit/indexed_db_dispatcher_host.h index 2a9ec0d..ae7b87c 100644 --- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.h +++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.h @@ -123,8 +123,6 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter { bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); void Send(IPC::Message* message); - void OnMetadata(int32 ipc_database_id, - IndexedDBDatabaseMetadata* metadata); void OnCreateObjectStore( const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params); void OnDeleteObjectStore(int32 ipc_database_id, diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc index 9d918d1..d48cbdd 100644 --- a/content/common/indexed_db/indexed_db_dispatcher.cc +++ b/content/common/indexed_db/indexed_db_dispatcher.cc @@ -133,8 +133,6 @@ void IndexedDBDispatcher::OnMessageReceived(const IPC::Message& msg) { OnSuccessCursorContinue) IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessCursorPrefetch, OnSuccessCursorPrefetch) - IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIDBDatabaseOld, - OnSuccessIDBDatabaseOld) IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIDBDatabase, OnSuccessIDBDatabase) IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIndexedDBKey, @@ -151,8 +149,6 @@ void IndexedDBDispatcher::OnMessageReceived(const IPC::Message& msg) { OnSuccessUndefined) IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksError, OnError) IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksIntBlocked, OnIntBlocked) - IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksUpgradeNeededOld, - OnUpgradeNeededOld) IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksUpgradeNeeded, OnUpgradeNeeded) IPC_MESSAGE_HANDLER(IndexedDBMsg_DatabaseCallbacksForcedClose, OnForcedClose) @@ -507,21 +503,6 @@ void IndexedDBDispatcher::DatabaseDestroyed(int32 ipc_database_id) { databases_.erase(ipc_database_id); } -void IndexedDBDispatcher::OnSuccessIDBDatabaseOld(int32 ipc_thread_id, - int32 ipc_response_id, - int32 ipc_object_id) { - DCHECK_EQ(ipc_thread_id, CurrentWorkerId()); - WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(ipc_response_id); - if (!callbacks) - return; - // If an upgrade was performed, count will be non-zero. - if (!databases_.count(ipc_object_id)) - databases_[ipc_object_id] = new RendererWebIDBDatabaseImpl(ipc_object_id); - DCHECK_EQ(databases_.count(ipc_object_id), 1u); - callbacks->onSuccess(databases_[ipc_object_id]); - pending_callbacks_.Remove(ipc_response_id); -} - void IndexedDBDispatcher::OnSuccessIDBDatabase( int32 ipc_thread_id, int32 ipc_response_id, @@ -681,21 +662,6 @@ void IndexedDBDispatcher::OnIntBlocked(int32 ipc_thread_id, callbacks->onBlocked(existing_version); } -void IndexedDBDispatcher::OnUpgradeNeededOld(int32 ipc_thread_id, - int32 ipc_response_id, - int32 ipc_database_id, - int64 old_version) { - DCHECK_EQ(ipc_thread_id, CurrentWorkerId()); - WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(ipc_response_id); - DCHECK(callbacks); - DCHECK(!databases_.count(ipc_database_id)); - databases_[ipc_database_id] = new RendererWebIDBDatabaseImpl(ipc_database_id); - callbacks->onUpgradeNeeded( - old_version, - 0, - databases_[ipc_database_id]); -} - void IndexedDBDispatcher::OnUpgradeNeeded( int32 ipc_thread_id, int32 ipc_response_id, diff --git a/content/common/indexed_db/indexed_db_dispatcher.h b/content/common/indexed_db/indexed_db_dispatcher.h index b9e30fc..9651930 100644 --- a/content/common/indexed_db/indexed_db_dispatcher.h +++ b/content/common/indexed_db/indexed_db_dispatcher.h @@ -196,9 +196,6 @@ class CONTENT_EXPORT IndexedDBDispatcher } // IDBCallback message handlers. - void OnSuccessIDBDatabaseOld(int32 ipc_thread_id, - int32 ipc_response_id, - int32 ipc_object_id); void OnSuccessIDBDatabase(int32 ipc_thread_id, int32 ipc_response_id, int32 ipc_object_id, @@ -238,10 +235,6 @@ class CONTENT_EXPORT IndexedDBDispatcher const string16& message); void OnIntBlocked(int32 ipc_thread_id, int32 ipc_response_id, int64 existing_version); - void OnUpgradeNeededOld(int32 ipc_thread_id, - int32 ipc_response_id, - int32 ipc_database_id, - int64 old_version); void OnUpgradeNeeded(int32 ipc_thread_id, int32 ipc_response_id, int32 ipc_database_id, diff --git a/content/common/indexed_db/indexed_db_dispatcher_unittest.cc b/content/common/indexed_db/indexed_db_dispatcher_unittest.cc index beb3d33..0e193f8 100644 --- a/content/common/indexed_db/indexed_db_dispatcher_unittest.cc +++ b/content/common/indexed_db/indexed_db_dispatcher_unittest.cc @@ -10,18 +10,12 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" using WebKit::WebVector; using WebKit::WebString; namespace content { -class FakeWebIDBTransaction : public WebKit::WebIDBTransaction { - public: - FakeWebIDBTransaction() {} -}; - // TODO(alecflett): Reenable this test when IDB code in webkit // enforces size limits. See http://crbug.com/160577 TEST(IndexedDBDispatcherTest, DISABLED_ValueSizeTest) { diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h index 31a9daa..16b4d51 100644 --- a/content/common/indexed_db/indexed_db_messages.h +++ b/content/common/indexed_db/indexed_db_messages.h @@ -302,10 +302,6 @@ IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance, IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch, IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) -IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIDBDatabaseOld, - int32 /* ipc_thread_id */, - int32 /* ipc_response_id */, - int32 /* ipc_database_id */) IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksSuccessIDBDatabase, int32 /* ipc_thread_id */, int32 /* ipc_response_id */, @@ -348,11 +344,6 @@ IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksIntBlocked, int32 /* ipc_thread_id */, int32 /* ipc_response_id */, int64 /* existing_version */) -IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksUpgradeNeededOld, - int32, /* ipc_thread_id */ - int32, /* ipc_response_id */ - int32, /* ipc_database_id */ - int64) /* old_version */ IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksUpgradeNeeded, int32, /* ipc_thread_id */ int32, /* ipc_response_id */ @@ -374,7 +365,6 @@ IPC_MESSAGE_CONTROL4(IndexedDBMsg_DatabaseCallbacksIntVersionChange, int32, /* ipc_database_id */ int64, /* old_version */ int64) /* new_version */ -// IDBTransactionCallback message handlers. IPC_MESSAGE_CONTROL5(IndexedDBMsg_DatabaseCallbacksAbort, int32, /* ipc_thread_id */ int32, /* ipc_database_id */ @@ -433,11 +423,6 @@ IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryOpen, IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryDeleteDatabase, IndexedDBHostMsg_FactoryDeleteDatabase_Params) -// WebIDBDatabase::metadata() message. -IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_DatabaseMetadata, - int32, /* ipc_database_id */ - IndexedDBDatabaseMetadata /* metadata */) - // WebIDBDatabase::createObjectStore() message. IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateObjectStore, IndexedDBHostMsg_DatabaseCreateObjectStore_Params) @@ -449,16 +434,6 @@ IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore, int64) /* object_store_id */ // WebIDBDatabase::createTransaction() message. -// TODO: make this message async. -IPC_SYNC_MESSAGE_CONTROL5_1(IndexedDBHostMsg_DatabaseCreateTransactionOld, - int32, /* ipc_thread_id */ - int32, /* ipc_database_id */ - int64, /* transaction_id */ - std::vector<int64>, /* object_stores */ - int32, /* mode */ - int32) /* ipc_transaction_id */ - - IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateTransaction, IndexedDBHostMsg_DatabaseCreateTransaction_Params) diff --git a/content/common/indexed_db/proxy_webidbdatabase_impl.cc b/content/common/indexed_db/proxy_webidbdatabase_impl.cc index 7394bf3..bde27a8 100644 --- a/content/common/indexed_db/proxy_webidbdatabase_impl.cc +++ b/content/common/indexed_db/proxy_webidbdatabase_impl.cc @@ -22,7 +22,6 @@ using WebKit::WebIDBCallbacks; using WebKit::WebIDBDatabaseCallbacks; using WebKit::WebIDBMetadata; using WebKit::WebIDBKeyPath; -using WebKit::WebIDBTransaction; using WebKit::WebString; using WebKit::WebVector; using webkit_glue::WorkerTaskRunner; @@ -45,14 +44,6 @@ RendererWebIDBDatabaseImpl::~RendererWebIDBDatabaseImpl() { dispatcher->DatabaseDestroyed(ipc_database_id_); } -WebIDBMetadata RendererWebIDBDatabaseImpl::metadata() const { - IndexedDBDatabaseMetadata idb_metadata; - IndexedDBDispatcher::Send( - new IndexedDBHostMsg_DatabaseMetadata(ipc_database_id_, &idb_metadata)); - - return IndexedDBDispatcher::ConvertMetadata(idb_metadata); -} - void RendererWebIDBDatabaseImpl::createObjectStore( long long transaction_id, long long object_store_id, diff --git a/content/common/indexed_db/proxy_webidbdatabase_impl.h b/content/common/indexed_db/proxy_webidbdatabase_impl.h index 0220d82..06834c7 100644 --- a/content/common/indexed_db/proxy_webidbdatabase_impl.h +++ b/content/common/indexed_db/proxy_webidbdatabase_impl.h @@ -12,7 +12,6 @@ namespace WebKit { class WebIDBCallbacks; class WebIDBDatabaseCallbacks; class WebString; -class WebIDBTransaction; } namespace content { @@ -23,7 +22,6 @@ class RendererWebIDBDatabaseImpl : public WebKit::WebIDBDatabase { virtual ~RendererWebIDBDatabaseImpl(); // WebKit::WebIDBDatabase - virtual WebKit::WebIDBMetadata metadata() const; virtual void createObjectStore( long long transaction_id, long long objectstore_id, |