diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 20:00:20 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 20:00:20 +0000 |
commit | 93d49d70b89b22ec46d0b00b7950297f64865d56 (patch) | |
tree | 3243e0209c738df0c18c2ba615667f757fcaec94 /chrome/browser/debugger | |
parent | a9f607e33a91604bc63bd8c846aefbda9bf0dfa9 (diff) | |
download | chromium_src-93d49d70b89b22ec46d0b00b7950297f64865d56.zip chromium_src-93d49d70b89b22ec46d0b00b7950297f64865d56.tar.gz chromium_src-93d49d70b89b22ec46d0b00b7950297f64865d56.tar.bz2 |
Move the json-related files into a separate json directory. This hopefully also
makes the naming of string_escape more clear (it's actually JSON-specific).
Move the files into the base namespace.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/316016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r-- | chrome/browser/debugger/debugger_remote_service.cc | 10 | ||||
-rw-r--r-- | chrome/browser/debugger/devtools_remote_service.cc | 8 | ||||
-rw-r--r-- | chrome/browser/debugger/extension_ports_remote_service.cc | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/chrome/browser/debugger/debugger_remote_service.cc b/chrome/browser/debugger/debugger_remote_service.cc index 9a46c63..8f941ca 100644 --- a/chrome/browser/debugger/debugger_remote_service.cc +++ b/chrome/browser/debugger/debugger_remote_service.cc @@ -7,8 +7,8 @@ #include "chrome/browser/debugger/debugger_remote_service.h" -#include "base/json_reader.h" -#include "base/json_writer.h" +#include "base/json/json_reader.h" +#include "base/json/json_writer.h" #include "base/string_util.h" #include "base/values.h" #include "chrome/browser/browser_process.h" @@ -65,7 +65,7 @@ DebuggerRemoteService::~DebuggerRemoteService() {} void DebuggerRemoteService::HandleMessage( const DevToolsRemoteMessage& message) { const std::string destination = message.destination(); - scoped_ptr<Value> request(JSONReader::Read(message.content(), true)); + scoped_ptr<Value> request(base::JSONReader::Read(message.content(), true)); if (request.get() == NULL) { // Bad JSON NOTREACHED(); @@ -129,7 +129,7 @@ void DebuggerRemoteService::SendResponse(const Value& response, const std::string& tool, const std::string& destination) { std::string response_content; - JSONWriter::Write(&response, false, &response_content); + base::JSONWriter::Write(&response, false, &response_content); scoped_ptr<DevToolsRemoteMessage> response_message( DevToolsRemoteMessageBuilder::instance().Create(tool, destination, @@ -304,7 +304,7 @@ bool DebuggerRemoteService::DispatchDebuggerCommand(int tab_uid, std::string v8_command; DictionaryValue* v8_command_value; content->GetDictionary(kDataWide, &v8_command_value); - JSONWriter::Write(v8_command_value, false, &v8_command); + base::JSONWriter::Write(v8_command_value, false, &v8_command); manager->ForwardToDevToolsAgent( client_host, DevToolsAgentMsg_DebuggerCommand(v8_command)); // Do not send the response right now, as the JSON will be received from diff --git a/chrome/browser/debugger/devtools_remote_service.cc b/chrome/browser/debugger/devtools_remote_service.cc index 4308d18..3f786af9 100644 --- a/chrome/browser/debugger/devtools_remote_service.cc +++ b/chrome/browser/debugger/devtools_remote_service.cc @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/json_reader.h" -#include "base/json_writer.h" +#include "base/json/json_reader.h" +#include "base/json/json_writer.h" #include "base/scoped_ptr.h" #include "base/values.h" #include "chrome/browser/browser_process.h" @@ -32,7 +32,7 @@ DevToolsRemoteService::~DevToolsRemoteService() {} void DevToolsRemoteService::HandleMessage( const DevToolsRemoteMessage& message) { - scoped_ptr<Value> request(JSONReader::Read(message.content(), false)); + scoped_ptr<Value> request(base::JSONReader::Read(message.content(), false)); if (request.get() == NULL) { // Bad JSON NOTREACHED(); @@ -94,7 +94,7 @@ void DevToolsRemoteService::ProcessJson(DictionaryValue* json, response.SetInteger(kResultWide, Result::kUnknownCommand); } std::string response_json; - JSONWriter::Write(&response, false, &response_json); + base::JSONWriter::Write(&response, false, &response_json); scoped_ptr<DevToolsRemoteMessage> response_message( DevToolsRemoteMessageBuilder::instance().Create(message.tool(), message.destination(), diff --git a/chrome/browser/debugger/extension_ports_remote_service.cc b/chrome/browser/debugger/extension_ports_remote_service.cc index 68057bd..ed40e99 100644 --- a/chrome/browser/debugger/extension_ports_remote_service.cc +++ b/chrome/browser/debugger/extension_ports_remote_service.cc @@ -9,8 +9,8 @@ #include "chrome/browser/debugger/extension_ports_remote_service.h" -#include "base/json_reader.h" -#include "base/json_writer.h" +#include "base/json/json_reader.h" +#include "base/json/json_writer.h" #include "base/message_loop.h" #include "base/string_util.h" #include "base/values.h" @@ -147,7 +147,7 @@ void ExtensionPortsRemoteService::HandleMessage( const DevToolsRemoteMessage& message) { DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI); const std::string destinationString = message.destination(); - scoped_ptr<Value> request(JSONReader::Read(message.content(), true)); + scoped_ptr<Value> request(base::JSONReader::Read(message.content(), true)); if (request.get() == NULL) { // Bad JSON NOTREACHED(); @@ -220,7 +220,7 @@ void ExtensionPortsRemoteService::SendResponse( const Value& response, const std::string& tool, const std::string& destination) { std::string response_content; - JSONWriter::Write(&response, false, &response_content); + base::JSONWriter::Write(&response, false, &response_content); scoped_ptr<DevToolsRemoteMessage> response_message( DevToolsRemoteMessageBuilder::instance().Create( tool, destination, response_content)); @@ -271,7 +271,7 @@ void ExtensionPortsRemoteService::OnExtensionMessage( content.SetString(kCommandWide, kOnMessage); content.SetInteger(kResultWide, RESULT_OK); // Turn the stringified message body back into JSON. - Value* data = JSONReader::Read(message, false); + Value* data = base::JSONReader::Read(message, false); if (!data) { NOTREACHED(); return; @@ -374,7 +374,7 @@ void ExtensionPortsRemoteService::PostMessageCommand( } std::string message; // Stringified the JSON message body. - JSONWriter::Write(data, false, &message); + base::JSONWriter::Write(data, false, &message); LOG(INFO) << "postMessage: port " << port_id << ", message: <" << message << ">"; PortIdSet::iterator portEntry = openPortIds_.find(port_id); |