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

Unified Diff: content/utility/utility_thread_impl.cc

Issue 10873028: Revert 152873 - Remove all the indexeddb-related utility process code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « content/utility/utility_thread_impl.h ('k') | webkit/glue/idb_bindings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/utility/utility_thread_impl.cc
===================================================================
--- content/utility/utility_thread_impl.cc (revision 152976)
+++ content/utility/utility_thread_impl.cc (working copy)
@@ -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 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 @@
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;
}
« no previous file with comments | « content/utility/utility_thread_impl.h ('k') | webkit/glue/idb_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698