summaryrefslogtreecommitdiff
path: root/chromium/net/tools
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-13 16:23:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-14 10:37:21 +0000
commit38a9a29f4f9436cace7f0e7abf9c586057df8a4e (patch)
treec4e8c458dc595bc0ddb435708fa2229edfd00bd4 /chromium/net/tools
parente684a3455bcc29a6e3e66a004e352dea4e1141e7 (diff)
downloadqtwebengine-chromium-38a9a29f4f9436cace7f0e7abf9c586057df8a4e.tar.gz
BASELINE: Update Chromium to 73.0.3683.37
Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/net/tools')
-rw-r--r--chromium/net/tools/cachetool/cachetool.cc6
-rw-r--r--chromium/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc3
-rw-r--r--chromium/net/tools/crash_cache/crash_cache.cc3
-rwxr-xr-xchromium/net/tools/print_certificates.py1
-rw-r--r--chromium/net/tools/quic/quic_client_message_loop_network_helper.cc2
-rw-r--r--chromium/net/tools/quic/quic_http_proxy_backend.cc4
-rw-r--r--chromium/net/tools/quic/quic_http_proxy_backend_stream.h2
-rw-r--r--chromium/net/tools/quic/quic_http_proxy_backend_stream_test.cc10
-rw-r--r--chromium/net/tools/quic/quic_http_proxy_backend_test.cc8
-rw-r--r--chromium/net/tools/quic/quic_simple_client.cc2
-rw-r--r--chromium/net/tools/quic/quic_simple_client_bin.cc2
-rw-r--r--chromium/net/tools/quic/quic_simple_server_packet_writer.cc4
-rw-r--r--chromium/net/tools/quic/quic_simple_server_session_helper.cc4
-rw-r--r--chromium/net/tools/quic/quic_simple_server_session_helper_test.cc7
-rw-r--r--chromium/net/tools/quic/quic_simple_server_test.cc3
-rw-r--r--chromium/net/tools/tld_cleanup/tld_cleanup_util.cc5
16 files changed, 43 insertions, 23 deletions
diff --git a/chromium/net/tools/cachetool/cachetool.cc b/chromium/net/tools/cachetool/cachetool.cc
index 8dffa6dc74e..650e5d026e8 100644
--- a/chromium/net/tools/cachetool/cachetool.cc
+++ b/chromium/net/tools/cachetool/cachetool.cc
@@ -11,10 +11,10 @@
#include "base/files/file_path.h"
#include "base/format_macros.h"
#include "base/logging.h"
-#include "base/macros.h"
#include "base/md5.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/stringprintf.h"
@@ -101,7 +101,7 @@ class CommandMarshal {
return index;
}
- // Reads the next parameter as an string.
+ // Reads the next parameter as a string.
virtual std::string ReadString() = 0;
// Reads the next parameter from stdin as string.
@@ -232,7 +232,7 @@ class StreamCommandMarshal final : public CommandMarshal {
return "";
std::cout.flush();
size_t command_id = static_cast<size_t>(std::cin.get());
- if (command_id >= arraysize(kCommandNames)) {
+ if (command_id >= base::size(kCommandNames)) {
ReturnFailure("Unknown command.");
return "";
}
diff --git a/chromium/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc b/chromium/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc
index 9bfbf6191ca..11e9e9a81fa 100644
--- a/chromium/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc
+++ b/chromium/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc
@@ -6,6 +6,7 @@
#include <iostream>
+#include "base/stl_util.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -50,7 +51,7 @@ bool DumpX509CertificateChain(const base::FilePath& file_path,
std::string FingerPrintCryptoBuffer(const CRYPTO_BUFFER* cert_handle) {
net::SHA256HashValue hash =
net::X509Certificate::CalculateFingerprint256(cert_handle);
- return base::HexEncode(hash.data, arraysize(hash.data));
+ return base::HexEncode(hash.data, base::size(hash.data));
}
// Returns a textual representation of the Subject of |cert|.
diff --git a/chromium/net/tools/crash_cache/crash_cache.cc b/chromium/net/tools/crash_cache/crash_cache.cc
index d55cf00095b..fd7fc910baa 100644
--- a/chromium/net/tools/crash_cache/crash_cache.cc
+++ b/chromium/net/tools/crash_cache/crash_cache.cc
@@ -17,6 +17,7 @@
#include "base/path_service.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -115,7 +116,7 @@ bool CreateTargetFolder(const base::FilePath& path, RankCrashes action,
"remove_load2",
"remove_load3"
};
- static_assert(arraysize(folders) == disk_cache::MAX_CRASH, "sync folders");
+ static_assert(base::size(folders) == disk_cache::MAX_CRASH, "sync folders");
DCHECK(action > disk_cache::NO_CRASH && action < disk_cache::MAX_CRASH);
*full_path = path.AppendASCII(folders[action]);
diff --git a/chromium/net/tools/print_certificates.py b/chromium/net/tools/print_certificates.py
index 908b36df6f6..9889b6fed3b 100755
--- a/chromium/net/tools/print_certificates.py
+++ b/chromium/net/tools/print_certificates.py
@@ -121,6 +121,7 @@ def decode_netlog_hexdump(netlog_text):
lines = netlog_text.splitlines()
# Skip the text preceeding the actual hexdump.
+ # TODO(eroman): New logs name this field "bytes" and it is Base64 encoded.
while lines and 'hex_encoded_bytes' not in lines[0]:
del lines[0]
if not lines:
diff --git a/chromium/net/tools/quic/quic_client_message_loop_network_helper.cc b/chromium/net/tools/quic/quic_client_message_loop_network_helper.cc
index 995ad4f75e5..41026fa2f7d 100644
--- a/chromium/net/tools/quic/quic_client_message_loop_network_helper.cc
+++ b/chromium/net/tools/quic/quic_client_message_loop_network_helper.cc
@@ -27,7 +27,7 @@
#include "net/third_party/quic/core/quic_server_id.h"
#include "net/third_party/quic/platform/api/quic_flags.h"
#include "net/third_party/quic/platform/api/quic_ptr_util.h"
-#include "net/third_party/spdy/core/spdy_header_block.h"
+#include "net/third_party/quiche/src/spdy/core/spdy_header_block.h"
using std::string;
diff --git a/chromium/net/tools/quic/quic_http_proxy_backend.cc b/chromium/net/tools/quic/quic_http_proxy_backend.cc
index e68e4ec2136..8ce6629d817 100644
--- a/chromium/net/tools/quic/quic_http_proxy_backend.cc
+++ b/chromium/net/tools/quic/quic_http_proxy_backend.cc
@@ -168,8 +168,8 @@ void QuicHttpProxyBackend::InitializeURLRequestContext() {
ProxyConfigWithAnnotation::CreateDirect()));
#endif
- // Disable net::CookieStore and net::ChannelIDService.
- context_builder.SetCookieAndChannelIdStores(nullptr, nullptr);
+ // Disable net::CookieStore.
+ context_builder.SetCookieStore(nullptr);
context_ = context_builder.Build();
}
diff --git a/chromium/net/tools/quic/quic_http_proxy_backend_stream.h b/chromium/net/tools/quic/quic_http_proxy_backend_stream.h
index a231433430a..a64a1cc351b 100644
--- a/chromium/net/tools/quic/quic_http_proxy_backend_stream.h
+++ b/chromium/net/tools/quic/quic_http_proxy_backend_stream.h
@@ -32,7 +32,7 @@
#include "net/third_party/quic/tools/quic_backend_response.h"
#include "net/third_party/quic/tools/quic_simple_server_backend.h"
-#include "net/third_party/spdy/core/spdy_header_block.h"
+#include "net/third_party/quiche/src/spdy/core/spdy_header_block.h"
#include "net/tools/quic/quic_http_proxy_backend.h"
namespace base {
diff --git a/chromium/net/tools/quic/quic_http_proxy_backend_stream_test.cc b/chromium/net/tools/quic/quic_http_proxy_backend_stream_test.cc
index 9d966feea90..b0e4372e588 100644
--- a/chromium/net/tools/quic/quic_http_proxy_backend_stream_test.cc
+++ b/chromium/net/tools/quic/quic_http_proxy_backend_stream_test.cc
@@ -14,7 +14,9 @@
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "net/test/embedded_test_server/request_handler_util.h"
+#include "net/third_party/quic/core/quic_connection_id.h"
#include "net/third_party/quic/platform/api/quic_test.h"
+#include "net/third_party/quic/test_tools/quic_test_utils.h"
#include "net/third_party/quic/tools/quic_backend_response.h"
#include "net/tools/quic/quic_http_proxy_backend.h"
@@ -118,9 +120,11 @@ class TestQuicServerStreamDelegate
run_loop_.Run();
}
- quic::QuicConnectionId connection_id() const override { return 123; };
- quic::QuicStreamId stream_id() const override { return 5; };
- std::string peer_host() const override { return "127.0.0.1"; };
+ quic::QuicConnectionId connection_id() const override {
+ return quic::test::TestConnectionId(123);
+ }
+ quic::QuicStreamId stream_id() const override { return 5; }
+ std::string peer_host() const override { return "127.0.0.1"; }
void OnResponseBackendComplete(
const quic::QuicBackendResponse* response,
diff --git a/chromium/net/tools/quic/quic_http_proxy_backend_test.cc b/chromium/net/tools/quic/quic_http_proxy_backend_test.cc
index 9919535c225..691f304ba4e 100644
--- a/chromium/net/tools/quic/quic_http_proxy_backend_test.cc
+++ b/chromium/net/tools/quic/quic_http_proxy_backend_test.cc
@@ -7,7 +7,9 @@
#include "base/test/scoped_task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "net/base/url_util.h"
+#include "net/third_party/quic/core/quic_connection_id.h"
#include "net/third_party/quic/platform/api/quic_test.h"
+#include "net/third_party/quic/test_tools/quic_test_utils.h"
#include "net/tools/quic/quic_http_proxy_backend.h"
#include "net/tools/quic/quic_http_proxy_backend_stream.h"
@@ -22,7 +24,9 @@ class TestQuicServerStream
~TestQuicServerStream() override {}
- quic::QuicConnectionId connection_id() const override { return 123; };
+ quic::QuicConnectionId connection_id() const override {
+ return quic::test::TestConnectionId(123);
+ };
quic::QuicStreamId stream_id() const override { return 5; };
std::string peer_host() const override { return "127.0.0.1"; };
@@ -135,4 +139,4 @@ TEST_F(QuicHttpProxyBackendTest, CheckGetBackendTaskRunner) {
}
} // namespace test
-} // namespace net \ No newline at end of file
+} // namespace net
diff --git a/chromium/net/tools/quic/quic_simple_client.cc b/chromium/net/tools/quic/quic_simple_client.cc
index 40f2f8d9992..63aa43086a6 100644
--- a/chromium/net/tools/quic/quic_simple_client.cc
+++ b/chromium/net/tools/quic/quic_simple_client.cc
@@ -27,7 +27,7 @@
#include "net/third_party/quic/core/quic_server_id.h"
#include "net/third_party/quic/platform/api/quic_flags.h"
#include "net/third_party/quic/platform/api/quic_ptr_util.h"
-#include "net/third_party/spdy/core/spdy_header_block.h"
+#include "net/third_party/quiche/src/spdy/core/spdy_header_block.h"
using std::string;
diff --git a/chromium/net/tools/quic/quic_simple_client_bin.cc b/chromium/net/tools/quic/quic_simple_client_bin.cc
index 956b612e012..2957aed800d 100644
--- a/chromium/net/tools/quic/quic_simple_client_bin.cc
+++ b/chromium/net/tools/quic/quic_simple_client_bin.cc
@@ -61,7 +61,7 @@
#include "net/third_party/quic/platform/api/quic_str_cat.h"
#include "net/third_party/quic/platform/api/quic_string_piece.h"
#include "net/third_party/quic/platform/api/quic_text_utils.h"
-#include "net/third_party/spdy/core/spdy_header_block.h"
+#include "net/third_party/quiche/src/spdy/core/spdy_header_block.h"
#include "net/tools/quic/quic_simple_client.h"
#include "net/tools/quic/synchronous_host_resolver.h"
#include "url/gurl.h"
diff --git a/chromium/net/tools/quic/quic_simple_server_packet_writer.cc b/chromium/net/tools/quic/quic_simple_server_packet_writer.cc
index 629f4f41eca..c8cfb44f547 100644
--- a/chromium/net/tools/quic/quic_simple_server_packet_writer.cc
+++ b/chromium/net/tools/quic/quic_simple_server_packet_writer.cc
@@ -36,7 +36,7 @@ quic::WriteResult QuicSimpleServerPacketWriter::WritePacketWithCallback(
callback_ = callback;
quic::WriteResult result =
WritePacket(buffer, buf_len, self_address, peer_address, options);
- if (result.status != quic::WRITE_STATUS_BLOCKED) {
+ if (!quic::IsWriteBlockedStatus(result.status)) {
callback_.Reset();
}
return result;
@@ -91,7 +91,7 @@ quic::WriteResult QuicSimpleServerPacketWriter::WritePacket(
base::UmaHistogramSparse("Net.quic::QuicSession.WriteError", -rv);
status = quic::WRITE_STATUS_ERROR;
} else {
- status = quic::WRITE_STATUS_BLOCKED;
+ status = quic::WRITE_STATUS_BLOCKED_DATA_BUFFERED;
write_blocked_ = true;
}
}
diff --git a/chromium/net/tools/quic/quic_simple_server_session_helper.cc b/chromium/net/tools/quic/quic_simple_server_session_helper.cc
index 1e212eac8c2..cb35d10bec9 100644
--- a/chromium/net/tools/quic/quic_simple_server_session_helper.cc
+++ b/chromium/net/tools/quic/quic_simple_server_session_helper.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "net/tools/quic/quic_simple_server_session_helper.h"
+#include "net/third_party/quic/core/quic_connection_id.h"
+#include "net/third_party/quic/core/quic_utils.h"
namespace net {
@@ -15,7 +17,7 @@ QuicSimpleServerSessionHelper::~QuicSimpleServerSessionHelper() = default;
quic::QuicConnectionId
QuicSimpleServerSessionHelper::GenerateConnectionIdForReject(
quic::QuicConnectionId /*connection_id*/) const {
- return random_->RandUint64();
+ return quic::QuicUtils::CreateRandomConnectionId(random_);
}
bool QuicSimpleServerSessionHelper::CanAcceptClientHello(
diff --git a/chromium/net/tools/quic/quic_simple_server_session_helper_test.cc b/chromium/net/tools/quic/quic_simple_server_session_helper_test.cc
index f3afa028e77..a9c8e16bd58 100644
--- a/chromium/net/tools/quic/quic_simple_server_session_helper_test.cc
+++ b/chromium/net/tools/quic/quic_simple_server_session_helper_test.cc
@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "net/third_party/quic/core/quic_connection_id.h"
+#include "net/third_party/quic/core/quic_utils.h"
#include "net/third_party/quic/test_tools/mock_random.h"
+#include "net/third_party/quic/test_tools/quic_test_utils.h"
#include "net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -13,7 +16,9 @@ TEST(QuicSimpleCryptoServerStreamHelperTest, GenerateConnectionIdForReject) {
quic::test::MockRandom random;
quic::QuicSimpleCryptoServerStreamHelper helper(&random);
- EXPECT_EQ(random.RandUint64(), helper.GenerateConnectionIdForReject(42));
+ EXPECT_EQ(
+ quic::QuicUtils::CreateRandomConnectionId(&random),
+ helper.GenerateConnectionIdForReject(quic::test::TestConnectionId(42)));
}
} // namespace net
diff --git a/chromium/net/tools/quic/quic_simple_server_test.cc b/chromium/net/tools/quic/quic_simple_server_test.cc
index 50151f89a96..0df75865dd4 100644
--- a/chromium/net/tools/quic/quic_simple_server_test.cc
+++ b/chromium/net/tools/quic/quic_simple_server_test.cc
@@ -4,6 +4,7 @@
#include "net/tools/quic/quic_simple_server.h"
+#include "base/stl_util.h"
#include "net/third_party/quic/core/crypto/quic_random.h"
#include "net/third_party/quic/core/quic_crypto_stream.h"
#include "net/third_party/quic/core/quic_utils.h"
@@ -72,7 +73,7 @@ TEST_F(QuicChromeServerDispatchPacketTest, DispatchPacket) {
// private flags
0x00};
quic::QuicReceivedPacket encrypted_valid_packet(
- reinterpret_cast<char*>(valid_packet), arraysize(valid_packet),
+ reinterpret_cast<char*>(valid_packet), base::size(valid_packet),
quic::QuicTime::Zero(), false);
EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
diff --git a/chromium/net/tools/tld_cleanup/tld_cleanup_util.cc b/chromium/net/tools/tld_cleanup/tld_cleanup_util.cc
index 72db0a970e9..bf177ca1203 100644
--- a/chromium/net/tools/tld_cleanup/tld_cleanup_util.cc
+++ b/chromium/net/tools/tld_cleanup/tld_cleanup_util.cc
@@ -6,6 +6,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "url/gurl.h"
@@ -140,8 +141,8 @@ NormalizeResult NormalizeDataToRuleMap(const std::string data,
size_t line_end = 0;
bool is_private = false;
RuleMap extra_rules;
- int begin_private_length = arraysize(kBeginPrivateDomainsComment) - 1;
- int end_private_length = arraysize(kEndPrivateDomainsComment) - 1;
+ int begin_private_length = base::size(kBeginPrivateDomainsComment) - 1;
+ int end_private_length = base::size(kEndPrivateDomainsComment) - 1;
while (line_start < data.size()) {
if (line_start + begin_private_length < data.size() &&
!data.compare(line_start, begin_private_length,