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

Side by Side Diff: chrome/browser/debugger/devtools_remote_message.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string_util.h"
6 #include "chrome/browser/debugger/devtools_remote_message.h" 5 #include "chrome/browser/debugger/devtools_remote_message.h"
7 6
7 #include "base/string_number_conversions.h"
8
8 const char DevToolsRemoteMessageHeaders::kContentLength[] = "Content-Length"; 9 const char DevToolsRemoteMessageHeaders::kContentLength[] = "Content-Length";
9 const char DevToolsRemoteMessageHeaders::kTool[] = "Tool"; 10 const char DevToolsRemoteMessageHeaders::kTool[] = "Tool";
10 const char DevToolsRemoteMessageHeaders::kDestination[] = "Destination"; 11 const char DevToolsRemoteMessageHeaders::kDestination[] = "Destination";
11 12
12 const char DevToolsRemoteMessage::kEmptyValue[] = ""; 13 const char DevToolsRemoteMessage::kEmptyValue[] = "";
13 14
14 DevToolsRemoteMessageBuilder& DevToolsRemoteMessageBuilder::instance() { 15 DevToolsRemoteMessageBuilder& DevToolsRemoteMessageBuilder::instance() {
15 static DevToolsRemoteMessageBuilder instance_; 16 static DevToolsRemoteMessageBuilder instance_;
16 return instance_; 17 return instance_;
17 } 18 }
(...skipping 22 matching lines...) Expand all
40 result.append("\r\n").append(content_); 41 result.append("\r\n").append(content_);
41 return result; 42 return result;
42 } 43 }
43 44
44 DevToolsRemoteMessage* DevToolsRemoteMessageBuilder::Create( 45 DevToolsRemoteMessage* DevToolsRemoteMessageBuilder::Create(
45 const std::string& tool, 46 const std::string& tool,
46 const std::string& destination, 47 const std::string& destination,
47 const std::string& content) { 48 const std::string& content) {
48 DevToolsRemoteMessage::HeaderMap headers; 49 DevToolsRemoteMessage::HeaderMap headers;
49 headers[DevToolsRemoteMessageHeaders::kContentLength] = 50 headers[DevToolsRemoteMessageHeaders::kContentLength] =
50 IntToString(content.size()); 51 base::IntToString(content.size());
51 headers[DevToolsRemoteMessageHeaders::kTool] = tool; 52 headers[DevToolsRemoteMessageHeaders::kTool] = tool;
52 headers[DevToolsRemoteMessageHeaders::kDestination] = destination; 53 headers[DevToolsRemoteMessageHeaders::kDestination] = destination;
53 return new DevToolsRemoteMessage(headers, content); 54 return new DevToolsRemoteMessage(headers, content);
54 } 55 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_remote_listen_socket.cc ('k') | chrome/browser/debugger/devtools_remote_message_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698