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..1862133c909eb5295cd05c732bb09d914388f71e 100644 |
--- a/chrome/browser/media/webrtc/webrtc_text_log_handler.cc |
+++ b/chrome/browser/media/webrtc/webrtc_text_log_handler.cc |
@@ -10,6 +10,7 @@ |
#include <vector> |
#include "base/bind.h" |
+#include "base/containers/stack_container.h" |
#include "base/cpu.h" |
#include "base/logging.h" |
#include "base/strings/string_number_conversions.h" |
@@ -77,9 +78,11 @@ 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::fill(bytes.begin() + 6, bytes.end(), 0); |
- net::IPAddress stripped_address(bytes); |
+ base::StackVector<uint8_t, 16> bytes; |
eroman
2017/05/19 22:00:07
How about without StackVector:
net::IPAddressByte
Ryan Hamilton
2017/05/20 03:21:44
Done. (With minor modifications)
eroman
2017/05/22 18:06:44
Let's worry about that later (Was just an observat
|
+ for (uint8_t byte : address.bytes()) |
+ bytes->push_back(byte); |
+ std::fill(bytes->begin() + 6, bytes->end(), 0); |
+ net::IPAddress stripped_address(bytes->data(), bytes->size()); |
sensitive_address = stripped_address.ToString(); |
break; |
} |