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 1b9da1d2e744a426ca937d4272424974d3040010..bd1be4b0dc7ce7611234c174ddbf1b762539be91 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) { |
LOG(ERROR) << "Error writing DevTools active port to file"; |
} |
} |