diff options
Diffstat (limited to 'chromium/jingle')
6 files changed, 20 insertions, 6 deletions
diff --git a/chromium/jingle/glue/logging_unittest.cc b/chromium/jingle/glue/logging_unittest.cc index 8c5cce5774f..bf67dcf04d3 100644 --- a/chromium/jingle/glue/logging_unittest.cc +++ b/chromium/jingle/glue/logging_unittest.cc @@ -11,6 +11,7 @@ // since webrtc's logging.h file may conflict with chromium. #include "base/command_line.h" #include "base/files/file_util.h" +#include "base/logging.h" #include "testing/gtest/include/gtest/gtest.h" // The following include come before including logging.h. It ensures that diff --git a/chromium/jingle/glue/network_service_async_socket.cc b/chromium/jingle/glue/network_service_async_socket.cc index e6501bb12e1..ef26e717947 100644 --- a/chromium/jingle/glue/network_service_async_socket.cc +++ b/chromium/jingle/glue/network_service_async_socket.cc @@ -17,6 +17,9 @@ #include "mojo/public/cpp/bindings/pending_remote.h" #include "net/base/host_port_pair.h" #include "net/base/io_buffer.h" +#include "net/base/network_isolation_key.h" +#include "url/gurl.h" +#include "url/origin.h" namespace jingle_glue { @@ -164,8 +167,13 @@ bool NetworkServiceAsyncSocket::Connect(const net::HostPortPair& address) { network::mojom::ProxyResolvingSocketOptions::New(); options->use_tls = false; options->fake_tls_handshake = use_fake_tls_handshake_; + GURL url("https://" + address.ToString()); + auto origin = url::Origin::Create(url); socket_factory_->CreateProxyResolvingSocket( - GURL("https://" + address.ToString()), std::move(options), + url, + net::NetworkIsolationKey(origin /* top_frame_origin */, + origin /* frame_origin */), + std::move(options), net::MutableNetworkTrafficAnnotationTag(traffic_annotation_), socket_.BindNewPipeAndPassReceiver(), std::move(socket_observer), base::BindOnce(&NetworkServiceAsyncSocket::ProcessConnectDone, diff --git a/chromium/jingle/glue/network_service_async_socket_unittest.cc b/chromium/jingle/glue/network_service_async_socket_unittest.cc index 246d17d97fc..8da261f608b 100644 --- a/chromium/jingle/glue/network_service_async_socket_unittest.cc +++ b/chromium/jingle/glue/network_service_async_socket_unittest.cc @@ -30,6 +30,7 @@ #include "net/base/host_port_pair.h" #include "net/base/ip_address.h" #include "net/base/net_errors.h" +#include "net/base/network_isolation_key.h" #include "net/cert/mock_cert_verifier.h" #include "net/http/transport_security_state.h" #include "net/log/net_log_source.h" @@ -42,6 +43,7 @@ #include "services/network/public/mojom/proxy_resolving_socket.mojom.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/webrtc/rtc_base/third_party/sigslot/sigslot.h" +#include "url/origin.h" namespace jingle_glue { @@ -191,11 +193,16 @@ class MockProxyResolvingSocketFactory // mojom::ProxyResolvingSocketFactory implementation. void CreateProxyResolvingSocket( const GURL& url, + const net::NetworkIsolationKey& network_isolation_key, network::mojom::ProxyResolvingSocketOptionsPtr options, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver<network::mojom::ProxyResolvingSocket> receiver, mojo::PendingRemote<network::mojom::SocketObserver> observer, CreateProxyResolvingSocketCallback callback) override { + url::Origin origin = url::Origin::Create(url); + EXPECT_EQ(net::NetworkIsolationKey(origin /* top_frame_origin */, + origin /* frame_origin */), + network_isolation_key); auto socket = std::make_unique<MockProxyResolvingSocket>(); socket_raw_ = socket.get(); proxy_resolving_socket_receivers_.Add(std::move(socket), diff --git a/chromium/jingle/glue/thread_wrapper_unittest.cc b/chromium/jingle/glue/thread_wrapper_unittest.cc index 47c7ab0fbfc..7d8fe9cc936 100644 --- a/chromium/jingle/glue/thread_wrapper_unittest.cc +++ b/chromium/jingle/glue/thread_wrapper_unittest.cc @@ -80,9 +80,7 @@ class ThreadWrapperTest : public testing::Test { } protected: - ThreadWrapperTest() - : thread_(NULL) { - } + ThreadWrapperTest() : thread_(nullptr) {} void SetUp() override { JingleThreadWrapper::EnsureForCurrentMessageLoop(); diff --git a/chromium/jingle/notifier/base/xmpp_connection.cc b/chromium/jingle/notifier/base/xmpp_connection.cc index 4a1e41f1f94..4e5aa6aac4b 100644 --- a/chromium/jingle/notifier/base/xmpp_connection.cc +++ b/chromium/jingle/notifier/base/xmpp_connection.cc @@ -116,7 +116,7 @@ void XmppConnection::OnStateChange(jingle_xmpp::XmppEngine::State state) { weak_xmpp_client_->GetStreamError(); ClearClient(); Delegate* delegate = delegate_; - delegate_ = NULL; + delegate_ = nullptr; delegate->OnError(error, subcode, stream_error); break; } diff --git a/chromium/jingle/notifier/listener/non_blocking_push_client_unittest.cc b/chromium/jingle/notifier/listener/non_blocking_push_client_unittest.cc index acb7e3c0140..13f7b0ee03a 100644 --- a/chromium/jingle/notifier/listener/non_blocking_push_client_unittest.cc +++ b/chromium/jingle/notifier/listener/non_blocking_push_client_unittest.cc @@ -26,7 +26,7 @@ namespace { class NonBlockingPushClientTest : public testing::Test { protected: - NonBlockingPushClientTest() : fake_push_client_(NULL) {} + NonBlockingPushClientTest() : fake_push_client_(nullptr) {} ~NonBlockingPushClientTest() override {} |