Chromium Code Reviews| Index: content/browser/devtools/devtools_http_handler_impl.cc |
| diff --git a/content/browser/devtools/devtools_http_handler_impl.cc b/content/browser/devtools/devtools_http_handler_impl.cc |
| index 113c2e556d5e10fbb0fa4547a102d8aebd4903df..c45d529a4ed476cbd3f0fa422b3a3048f76b2bab 100644 |
| --- a/content/browser/devtools/devtools_http_handler_impl.cc |
| +++ b/content/browser/devtools/devtools_http_handler_impl.cc |
| @@ -5,7 +5,6 @@ |
| #include "content/browser/devtools/devtools_http_handler_impl.h" |
| #include <algorithm> |
| -#include <sstream> |
| #include <utility> |
| #include "base/bind.h" |
| @@ -15,6 +14,7 @@ |
| #include "base/logging.h" |
| #include "base/message_loop/message_loop_proxy.h" |
| #include "base/stl_util.h" |
| +#include "base/strings/string_number_conversions.h" |
| #include "base/threading/thread.h" |
| #include "base/values.h" |
| #include "content/browser/devtools/devtools_browser_target.h" |
| @@ -699,10 +699,8 @@ void DevToolsHttpHandlerImpl::WriteActivePortToUserProfile() { |
| // so Telemetry can pick it up. |
| base::FilePath path = active_port_output_directory_.Append( |
| kDevToolsActivePortFileName); |
| - std::stringstream port_stream; |
| - port_stream << endpoint.port(); |
| - std::string s = port_stream.str(); |
| - if (base::WriteFile(path, s.c_str(), s.length()) < 0) { |
| + std::string port_string = base::IntToString(endpoint.port()); |
| + if (base::WriteFile(path, port_string.c_str(), port_string.length()) < 0) { |
|
wtc
2014/06/10 17:46:44
Nit: we can use data() instead of c_str(), which i
|
| LOG(ERROR) << "Error writing DevTools active port to file"; |
| } |
| } |