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

Side by Side Diff: mojo/services/network/network_service_impl.cc

Issue 596383002: Mojo UDP API implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@udp_interface
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « mojo/services/network/network_service_impl.h ('k') | mojo/services/network/udp_socket_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/services/network/network_service_impl.h" 5 #include "mojo/services/network/network_service_impl.h"
6 6
7 #include "mojo/public/cpp/application/application_connection.h" 7 #include "mojo/public/cpp/application/application_connection.h"
8 #include "mojo/services/network/cookie_store_impl.h" 8 #include "mojo/services/network/cookie_store_impl.h"
9 #include "mojo/services/network/net_adapters.h" 9 #include "mojo/services/network/net_adapters.h"
10 #include "mojo/services/network/tcp_bound_socket_impl.h" 10 #include "mojo/services/network/tcp_bound_socket_impl.h"
11 #include "mojo/services/network/udp_socket_impl.h"
11 #include "mojo/services/network/url_loader_impl.h" 12 #include "mojo/services/network/url_loader_impl.h"
12 #include "mojo/services/network/web_socket_impl.h" 13 #include "mojo/services/network/web_socket_impl.h"
13 14
14 namespace mojo { 15 namespace mojo {
15 16
16 namespace { 17 namespace {
17 18
18 // Allows a Callback<NetworkErrorPtr, NetAddressPtr> to be called by a 19 // Allows a Callback<NetworkErrorPtr, NetAddressPtr> to be called by a
19 // Callback<NetworkErrorPtr> when the address is already known. 20 // Callback<NetworkErrorPtr> when the address is already known.
20 void BoundAddressCallbackAdapter( 21 void BoundAddressCallbackAdapter(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 78 }
78 79
79 bound_socket.Connect( 80 bound_socket.Connect(
80 remote_address.Pass(), send_stream.Pass(), receive_stream.Pass(), 81 remote_address.Pass(), send_stream.Pass(), receive_stream.Pass(),
81 client_socket.Pass(), 82 client_socket.Pass(),
82 base::Bind(&BoundAddressCallbackAdapter, 83 base::Bind(&BoundAddressCallbackAdapter,
83 callback, 84 callback,
84 base::Passed(bound_socket.GetLocalAddress().Pass()))); 85 base::Passed(bound_socket.GetLocalAddress().Pass())));
85 } 86 }
86 87
88 void NetworkServiceImpl::CreateUDPSocket(InterfaceRequest<UDPSocket> socket) {
89 BindToRequest(new UDPSocketImpl(), &socket);
90 }
91
87 } // namespace mojo 92 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/network_service_impl.h ('k') | mojo/services/network/udp_socket_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698