| Index: chrome/browser/devtools/devtools_protocol.cc
|
| diff --git a/chrome/browser/devtools/devtools_protocol.cc b/chrome/browser/devtools/devtools_protocol.cc
|
| index 8581d8b6279fd050ad9be9801d33dbe60bfb9ee1..a22811053180c073bdcfd1f65072d176f448765c 100644
|
| --- a/chrome/browser/devtools/devtools_protocol.cc
|
| +++ b/chrome/browser/devtools/devtools_protocol.cc
|
| @@ -19,7 +19,9 @@
|
| const char kResultParam[] = "result";
|
|
|
| // JSON RPC 2.0 spec: http://www.jsonrpc.org/specification#error_object
|
| -enum Error { kErrorInvalidParams = -32602, kErrorServerError = -32000 };
|
| +enum Error {
|
| + kErrorInvalidParams = -32602
|
| +};
|
|
|
| } // namespace
|
|
|
| @@ -44,26 +46,12 @@
|
| DevToolsProtocol::CreateInvalidParamsResponse(int command_id,
|
| const std::string& param) {
|
| std::unique_ptr<base::DictionaryValue> response(new base::DictionaryValue());
|
| - response->SetInteger(kIdParam, command_id);
|
| base::DictionaryValue* error_object = new base::DictionaryValue();
|
| response->Set(kErrorParam, error_object);
|
| error_object->SetInteger(kErrorCodeParam, kErrorInvalidParams);
|
| error_object->SetString(kErrorMessageParam,
|
| base::StringPrintf("Missing or invalid '%s' parameter", param.c_str()));
|
|
|
| - return response;
|
| -}
|
| -
|
| -// static
|
| -std::unique_ptr<base::DictionaryValue> DevToolsProtocol::CreateErrorResponse(
|
| - int command_id,
|
| - const std::string& error_message) {
|
| - std::unique_ptr<base::DictionaryValue> response(new base::DictionaryValue());
|
| - response->SetInteger(kIdParam, command_id);
|
| - base::DictionaryValue* error_object = new base::DictionaryValue();
|
| - response->Set(kErrorParam, error_object);
|
| - error_object->SetInteger(kErrorCodeParam, kErrorServerError);
|
| - error_object->SetString(kErrorMessageParam, error_message);
|
| return response;
|
| }
|
|
|
|
|