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

Unified Diff: chrome/browser/dom_ui/dom_ui.cc

Issue 251093: Modify extension request IPC messages to pass a ListValue instead of a string. (Closed)
Patch Set: notreached messages Created 11 years, 2 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/dom_ui/dom_ui.h ('k') | chrome/browser/extensions/extension_dom_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/dom_ui.cc
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc
index 2088427f3d8f10e24bc497eae2d948e0cdff4f96..7f38aef26fad84bbcb58b526863479992b727876 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/dom_ui.cc
@@ -35,7 +35,7 @@ DOMUI::~DOMUI() {
// DOMUI, public: -------------------------------------------------------------
void DOMUI::ProcessDOMUIMessage(const std::string& message,
- const std::string& content,
+ const Value* content,
int request_id,
bool has_callback) {
// Look up the callback for this message.
@@ -44,20 +44,8 @@ void DOMUI::ProcessDOMUIMessage(const std::string& message,
if (callback == message_callbacks_.end())
return;
- // Convert the content JSON into a Value.
- scoped_ptr<Value> value;
- if (!content.empty()) {
- value.reset(JSONReader::Read(content, false));
- if (!value.get()) {
- // The page sent us something that we didn't understand.
- // This probably indicates a programming error.
- NOTREACHED();
- return;
- }
- }
-
// Forward this message and content on.
- callback->second->Run(value.get());
+ callback->second->Run(content);
}
void DOMUI::CallJavascriptFunction(const std::wstring& function_name) {
« no previous file with comments | « chrome/browser/dom_ui/dom_ui.h ('k') | chrome/browser/extensions/extension_dom_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698