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

Unified Diff: chrome/browser/extensions/extension_function.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
Index: chrome/browser/extensions/extension_function.cc
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc
index 26adefb7245b5c27e9fd227b34630d57ffcb8722..c15c18ba8e4fda737f49ffab136a12a0802a4f9f 100644
--- a/chrome/browser/extensions/extension_function.cc
+++ b/chrome/browser/extensions/extension_function.cc
@@ -4,24 +4,13 @@
#include "chrome/browser/extensions/extension_function.h"
-#include "base/json_reader.h"
#include "base/json_writer.h"
#include "base/logging.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
-void AsyncExtensionFunction::SetArgs(const std::string& args) {
+void AsyncExtensionFunction::SetArgs(const Value* args) {
DCHECK(!args_); // Should only be called once.
- if (!args.empty()) {
- JSONReader reader;
- args_ = reader.JsonToValue(args, false, false);
-
- // Since we do the serialization in the v8 extension, we should always get
- // valid JSON.
- if (!args_) {
- DCHECK(false);
- return;
- }
- }
+ args_ = args->DeepCopy();
}
const std::string AsyncExtensionFunction::GetResult() {
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/browser/extensions/extension_function_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698