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

Unified Diff: chrome/browser/extensions/message_handler.cc

Issue 16226004: Replace JSON (de)serialization of extension messages with direct Value pickling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 | « chrome/browser/extensions/message_handler.h ('k') | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/message_handler.cc
diff --git a/chrome/browser/extensions/message_handler.cc b/chrome/browser/extensions/message_handler.cc
index 79b94c9e53bb28a1a100a8a9ccdc55f53731f771..f0576e5f93df4275214d8b73485208f735f3c61d 100644
--- a/chrome/browser/extensions/message_handler.cc
+++ b/chrome/browser/extensions/message_handler.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/extensions/message_handler.h"
+#include "base/values.h"
#include "chrome/browser/extensions/api/messaging/message_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
@@ -43,12 +44,12 @@ void MessageHandler::RenderViewHostInitialized() {
}
void MessageHandler::OnPostMessage(int port_id,
- const std::string& message) {
+ const base::ListValue& message) {
Profile* profile = Profile::FromBrowserContext(
render_view_host()->GetProcess()->GetBrowserContext());
MessageService* message_service = MessageService::Get(profile);
if (message_service) {
- message_service->PostMessage(port_id, message);
+ message_service->PostMessage(port_id, make_scoped_ptr(message.DeepCopy()));
}
}
« no previous file with comments | « chrome/browser/extensions/message_handler.h ('k') | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698