summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authoralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-19 19:03:26 +0000
committeralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-19 19:03:26 +0000
commita8ee29fa63f1bae24a84d5b251472025cda103ab (patch)
tree00d7fc7be21e889e5b0870ec5e5c9dc2dd56a6ad /content
parenta4f99345e6beb043826a4da147f72fb49c554f29 (diff)
downloadchromium_src-a8ee29fa63f1bae24a84d5b251472025cda103ab.zip
chromium_src-a8ee29fa63f1bae24a84d5b251472025cda103ab.tar.gz
chromium_src-a8ee29fa63f1bae24a84d5b251472025cda103ab.tar.bz2
Remove old copying put() methods and messages
R=dgrogan@chromium.org,tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/12280008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183261 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/in_process_webkit/indexed_db_dispatcher_host.cc34
-rw-r--r--content/browser/in_process_webkit/indexed_db_dispatcher_host.h3
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.cc38
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.h17
-rw-r--r--content/common/indexed_db/indexed_db_messages.h31
-rw-r--r--content/common/indexed_db/proxy_webidbdatabase_impl.cc17
-rw-r--r--content/common/indexed_db/proxy_webidbdatabase_impl.h8
7 files changed, 0 insertions, 148 deletions
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 260f092..b04e56f 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -358,7 +358,6 @@ bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived(
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseClose, OnClose)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDestroyed, OnDestroyed)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseGet, OnGet)
- IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabasePutOld, OnPutOld)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabasePut, OnPut)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetIndexKeys,
OnSetIndexKeys)
@@ -477,39 +476,6 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnGet(
params.key_range, params.key_only, callbacks.release());
}
-void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPutOld(
- const IndexedDBHostMsg_DatabasePutOld_Params& params) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
-
- WebIDBDatabase* database = parent_->GetOrTerminateProcess(
- &map_, params.ipc_database_id);
- if (!database)
- return;
- scoped_ptr<WebIDBCallbacks> callbacks(
- new IndexedDBCallbacks<WebIDBKey>(parent_, params.ipc_thread_id,
- params.ipc_response_id));
- if (params.index_ids.size() != params.index_keys.size()) {
- callbacks->onError(WebIDBDatabaseError(
- WebKit::WebIDBDatabaseExceptionUnknownError,
- "Malformed IPC message: index_ids.size() != index_keys.size()"));
- return;
- }
-
- WebVector<unsigned char> value(params.value);
- int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id);
- database->put(host_transaction_id,
- params.object_store_id,
- &value, params.key,
- params.put_mode, callbacks.release(),
- params.index_ids,
- params.index_keys);
- TransactionIDToSizeMap* map =
- &parent_->database_dispatcher_host_->transaction_size_map_;
- // Size can't be big enough to overflow because it represents the
- // actual bytes passed through IPC.
- (*map)[host_transaction_id] += params.value.size();
-}
-
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPut(
const IndexedDBHostMsg_DatabasePut_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 1ed4311..53d5a05 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
@@ -17,13 +17,11 @@ class GURL;
struct IndexedDBDatabaseMetadata;
struct IndexedDBHostMsg_DatabaseCount_Params;
struct IndexedDBHostMsg_DatabaseCreateIndex_Params;
-struct IndexedDBHostMsg_DatabaseCreateObjectStoreOld_Params;
struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params;
struct IndexedDBHostMsg_DatabaseCreateTransaction_Params;
struct IndexedDBHostMsg_DatabaseDeleteRange_Params;
struct IndexedDBHostMsg_DatabaseGet_Params;
struct IndexedDBHostMsg_DatabaseOpenCursor_Params;
-struct IndexedDBHostMsg_DatabasePutOld_Params;
struct IndexedDBHostMsg_DatabasePut_Params;
struct IndexedDBHostMsg_DatabaseSetIndexKeys_Params;
struct IndexedDBHostMsg_FactoryDeleteDatabase_Params;
@@ -132,7 +130,6 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
void OnDestroyed(int32 ipc_database_id);
void OnGet(const IndexedDBHostMsg_DatabaseGet_Params& params);
- void OnPutOld(const IndexedDBHostMsg_DatabasePutOld_Params& params);
void OnPut(const IndexedDBHostMsg_DatabasePut_Params& params);
void OnSetIndexKeys(
const IndexedDBHostMsg_DatabaseSetIndexKeys_Params& params);
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index d3231e7..79a1b23 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -388,44 +388,6 @@ void IndexedDBDispatcher::RequestIDBDatabaseGet(
}
-void IndexedDBDispatcher::RequestIDBDatabasePutOld(
- int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id,
- WebKit::WebVector<unsigned char>* value,
- const IndexedDBKey& key,
- WebKit::WebIDBDatabase::PutMode put_mode,
- WebKit::WebIDBCallbacks* callbacks,
- const WebKit::WebVector<long long>& index_ids,
- const WebKit::WebVector<WebKit::WebVector<
- WebKit::WebIDBKey> >& index_keys) {
- ResetCursorPrefetchCaches();
- IndexedDBHostMsg_DatabasePutOld_Params params;
- init_params(params, callbacks);
- params.ipc_database_id = ipc_database_id;
- params.transaction_id = transaction_id;
- params.object_store_id = object_store_id;
-
- COMPILE_ASSERT(sizeof(params.value[0]) == sizeof((*value)[0]), Cant_copy);
- params.value.assign(value->data(), value->data() + value->size());
- params.key = key;
- params.put_mode = put_mode;
-
- COMPILE_ASSERT(sizeof(params.index_ids[0]) ==
- sizeof(index_ids[0]), Cant_copy);
- params.index_ids.assign(index_ids.data(),
- index_ids.data() + index_ids.size());
-
- params.index_keys.resize(index_keys.size());
- for (size_t i = 0; i < index_keys.size(); ++i) {
- params.index_keys[i].resize(index_keys[i].size());
- for (size_t j = 0; j < index_keys[i].size(); ++j) {
- params.index_keys[i][j] = IndexedDBKey(index_keys[i][j]);
- }
- }
- Send(new IndexedDBHostMsg_DatabasePutOld(params));
-}
-
void IndexedDBDispatcher::RequestIDBDatabasePut(
int32 ipc_database_id,
int64 transaction_id,
diff --git a/content/common/indexed_db/indexed_db_dispatcher.h b/content/common/indexed_db/indexed_db_dispatcher.h
index 7fa5dab..51a8b31 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.h
+++ b/content/common/indexed_db/indexed_db_dispatcher.h
@@ -134,18 +134,6 @@ class CONTENT_EXPORT IndexedDBDispatcher
bool key_only,
WebKit::WebIDBCallbacks* callbacks);
- void RequestIDBDatabasePutOld(
- int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id,
- WebKit::WebVector<unsigned char>* value,
- const IndexedDBKey& key,
- WebKit::WebIDBDatabase::PutMode put_mode,
- WebKit::WebIDBCallbacks* callbacks,
- const WebKit::WebVector<long long>& index_ids,
- const WebKit::WebVector<WebKit::WebVector<
- WebKit::WebIDBKey> >& index_keys);
-
void RequestIDBDatabasePut(
int32 ipc_database_id,
int64 transaction_id,
@@ -252,16 +240,11 @@ class CONTENT_EXPORT IndexedDBDispatcher
int32 ipc_database_id,
int64 old_version,
const IndexedDBDatabaseMetadata& metdata);
- void OnAbortOld(int32 ipc_thread_id,
- int32 ipc_transaction_id,
- int code,
- const string16& message);
void OnAbort(int32 ipc_thread_id,
int32 ipc_database_id,
int64 transaction_id,
int code,
const string16& message);
- void OnCompleteOld(int32 ipc_thread_id, int32 ipc_transaction_id);
void OnComplete(int32 ipc_thread_id,
int32 ipc_database_id,
int64 transaction_id);
diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h
index c490d3a..89519e35 100644
--- a/content/common/indexed_db/indexed_db_messages.h
+++ b/content/common/indexed_db/indexed_db_messages.h
@@ -113,33 +113,6 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params)
IPC_STRUCT_END()
// Used to set a value in an object store.
-IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePutOld_Params)
- // The id any response should contain.
- IPC_STRUCT_MEMBER(int32, ipc_thread_id)
- IPC_STRUCT_MEMBER(int32, ipc_response_id)
- // The database the object store belongs to.
- IPC_STRUCT_MEMBER(int32, ipc_database_id)
- // The transaction it's associated with.
- IPC_STRUCT_MEMBER(int64, transaction_id)
- // The object store's id.
- IPC_STRUCT_MEMBER(int64, object_store_id)
- // The index's id.
- IPC_STRUCT_MEMBER(int64, index_id)
- // The value to set.
- IPC_STRUCT_MEMBER(std::vector<char>, value)
- // The key to set it on (may not be "valid"/set in some cases).
- IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
- // Whether this is an add or a put.
- IPC_STRUCT_MEMBER(WebKit::WebIDBDatabase::PutMode, put_mode)
- // The names of the indexes used below.
- IPC_STRUCT_MEMBER(std::vector<int64>, index_ids)
- // The keys for each index, such that each inner vector corresponds
- // to each index named in index_names, respectively.
- IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >,
- index_keys)
-IPC_STRUCT_END()
-
-// Used to set a value in an object store.
IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params)
// The id any response should contain.
IPC_STRUCT_MEMBER(int32, ipc_thread_id)
@@ -477,10 +450,6 @@ IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGet,
IndexedDBHostMsg_DatabaseGet_Params)
// WebIDBDatabase::put() message.
-IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabasePutOld,
- IndexedDBHostMsg_DatabasePutOld_Params)
-
-// WebIDBDatabase::put() message.
IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabasePut,
IndexedDBHostMsg_DatabasePut_Params)
diff --git a/content/common/indexed_db/proxy_webidbdatabase_impl.cc b/content/common/indexed_db/proxy_webidbdatabase_impl.cc
index d9074dc..e031f7a 100644
--- a/content/common/indexed_db/proxy_webidbdatabase_impl.cc
+++ b/content/common/indexed_db/proxy_webidbdatabase_impl.cc
@@ -110,23 +110,6 @@ void RendererWebIDBDatabaseImpl::get(
void RendererWebIDBDatabaseImpl::put(
long long transaction_id,
long long object_store_id,
- WebVector<unsigned char>* value,
- const WebKit::WebIDBKey& key,
- PutMode put_mode,
- WebIDBCallbacks* callbacks,
- const WebVector<long long>& web_index_ids,
- const WebVector<WebIndexKeys>& web_index_keys) {
- IndexedDBDispatcher* dispatcher =
- IndexedDBDispatcher::ThreadSpecificInstance();
- dispatcher->RequestIDBDatabasePutOld(
- ipc_database_id_, transaction_id, object_store_id,
- value, IndexedDBKey(key), put_mode, callbacks,
- web_index_ids, web_index_keys);
-}
-
-void RendererWebIDBDatabaseImpl::put(
- long long transaction_id,
- long long object_store_id,
const WebKit::WebData& value,
const WebKit::WebIDBKey& key,
PutMode put_mode,
diff --git a/content/common/indexed_db/proxy_webidbdatabase_impl.h b/content/common/indexed_db/proxy_webidbdatabase_impl.h
index 61bebe1..b4142f3 100644
--- a/content/common/indexed_db/proxy_webidbdatabase_impl.h
+++ b/content/common/indexed_db/proxy_webidbdatabase_impl.h
@@ -45,14 +45,6 @@ class RendererWebIDBDatabaseImpl : public WebKit::WebIDBDatabase {
WebKit::WebIDBCallbacks*);
virtual void put(long long transactionId,
long long objectStoreId,
- WebKit::WebVector<unsigned char>* value,
- const WebKit::WebIDBKey&,
- PutMode,
- WebKit::WebIDBCallbacks*,
- const WebKit::WebVector<long long>& indexIds,
- const WebKit::WebVector<WebIndexKeys>&);
- virtual void put(long long transactionId,
- long long objectStoreId,
const WebKit::WebData& value,
const WebKit::WebIDBKey&,
PutMode,