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

Unified Diff: chrome/browser/media/webrtc/webrtc_text_log_handler.cc

Issue 2881673002: Avoid heap allocations in IPAddress (Closed)
Patch Set: Resize Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/webrtc/webrtc_text_log_handler.cc
diff --git a/chrome/browser/media/webrtc/webrtc_text_log_handler.cc b/chrome/browser/media/webrtc/webrtc_text_log_handler.cc
index ca36e00b46a32404fd3a64d45bebcc2bc4ee175d..4123b8ad2bbee3c22ced00fb136b9feb578033b7 100644
--- a/chrome/browser/media/webrtc/webrtc_text_log_handler.cc
+++ b/chrome/browser/media/webrtc/webrtc_text_log_handler.cc
@@ -77,7 +77,7 @@ std::string IPAddressToSensitiveString(const net::IPAddress& address) {
case net::IPAddress::kIPv6AddressSize: {
// TODO(grunell): Create a string of format "1:2:3:x:x:x:x:x" to clarify
// that the end has been stripped out.
- std::vector<uint8_t> bytes = address.bytes();
+ std::vector<uint8_t> bytes = address.BytesAsVector();
std::fill(bytes.begin() + 6, bytes.end(), 0);
net::IPAddress stripped_address(bytes);
sensitive_address = stripped_address.ToString();
« no previous file with comments | « no previous file | content/public/common/common_param_traits.cc » ('j') | content/public/common/common_param_traits.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698