diff options
author | ricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-23 10:47:07 +0000 |
---|---|---|
committer | ricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-23 10:47:07 +0000 |
commit | f6c57d4e7314812cd196e221462e15f57532f72f (patch) | |
tree | 45d015cf7844964169cde0f94da6fab04ed2eb12 /content/utility | |
parent | f9f83d3834d8d8e2a5f965469ee7b947a966993b (diff) | |
download | chromium_src-f6c57d4e7314812cd196e221462e15f57532f72f.zip chromium_src-f6c57d4e7314812cd196e221462e15f57532f72f.tar.gz chromium_src-f6c57d4e7314812cd196e221462e15f57532f72f.tar.bz2 |
Revert 152873 - Remove all the indexeddb-related utility process code
BUG=129471
Review URL: https://chromiumcodereview.appspot.com/10834350
This seems to be causing test failure on Linux Tests (dbg)(1), first hit here:
http://build.chromium.org/p/chromium/builders/Linux%20Tests%20%28dbg%29%281%29/builds/20655/steps/browser_tests/logs/stdio
TBR=alecflett@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10873028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/utility')
-rw-r--r-- | content/utility/utility_thread_impl.cc | 32 | ||||
-rw-r--r-- | content/utility/utility_thread_impl.h | 11 |
2 files changed, 43 insertions, 0 deletions
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc index 813d673..421d24a 100644 --- a/content/utility/utility_thread_impl.cc +++ b/content/utility/utility_thread_impl.cc @@ -11,11 +11,15 @@ #include "base/memory/scoped_vector.h" #include "content/common/child_process.h" #include "content/common/child_process_messages.h" +#include "content/common/indexed_db/indexed_db_key.h" +#include "content/common/indexed_db/indexed_db_key_path.h" #include "content/common/utility_messages.h" #include "content/common/webkitplatformsupport_impl.h" #include "content/public/utility/content_utility_client.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerializedScriptValue.h" +#include "webkit/glue/idb_bindings.h" #include "webkit/plugins/npapi/plugin_list.h" #if defined(TOOLKIT_GTK) @@ -75,6 +79,9 @@ bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(UtilityThreadImpl, msg) + IPC_MESSAGE_HANDLER(UtilityMsg_IDBKeysFromValuesAndKeyPath, + OnIDBKeysFromValuesAndKeyPath) + IPC_MESSAGE_HANDLER(UtilityMsg_InjectIDBKey, OnInjectIDBKey) IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Started, OnBatchModeStarted) IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Finished, OnBatchModeFinished) #if defined(OS_POSIX) @@ -85,6 +92,31 @@ bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { return handled; } +void UtilityThreadImpl::OnIDBKeysFromValuesAndKeyPath( + int id, + const std::vector<content::SerializedScriptValue>& serialized_script_values, + const content::IndexedDBKeyPath& idb_key_path) { + std::vector<WebKit::WebSerializedScriptValue> web_values; + ConvertVector(serialized_script_values, &web_values); + std::vector<WebKit::WebIDBKey> web_keys; + webkit_glue::IDBKeysFromValuesAndKeyPath( + web_values, idb_key_path, &web_keys); + std::vector<content::IndexedDBKey> keys; + ConvertVector(web_keys, &keys); + Send(new UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded(id, keys)); + ReleaseProcessIfNeeded(); +} + +void UtilityThreadImpl::OnInjectIDBKey( + const content::IndexedDBKey& key, + const content::SerializedScriptValue& value, + const content::IndexedDBKeyPath& key_path) { + content::SerializedScriptValue new_value( + webkit_glue::InjectIDBKey(key, value, key_path)); + Send(new UtilityHostMsg_InjectIDBKey_Finished(new_value)); + ReleaseProcessIfNeeded(); +} + void UtilityThreadImpl::OnBatchModeStarted() { batch_mode_ = true; } diff --git a/content/utility/utility_thread_impl.h b/content/utility/utility_thread_impl.h index 3e7fd9c..45f7a8b 100644 --- a/content/utility/utility_thread_impl.h +++ b/content/utility/utility_thread_impl.h @@ -17,6 +17,9 @@ class FilePath; namespace content { +class IndexedDBKey; +class IndexedDBKeyPath; +class SerializedScriptValue; class WebKitPlatformSupportImpl; } @@ -39,6 +42,14 @@ class UtilityThreadImpl : public content::UtilityThread, virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; // IPC message handlers. + void OnIDBKeysFromValuesAndKeyPath( + int id, + const std::vector<content::SerializedScriptValue>& + serialized_script_values, + const content::IndexedDBKeyPath& idb_key_path); + void OnInjectIDBKey(const content::IndexedDBKey& key, + const content::SerializedScriptValue& value, + const content::IndexedDBKeyPath& key_path); void OnBatchModeStarted(); void OnBatchModeFinished(); |