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

Side by Side Diff: net/udp/udp_net_log_parameters.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/udp/udp_net_log_parameters.h" 5 #include "net/udp/udp_net_log_parameters.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 24 matching lines...) Expand all
35 NetLogCaptureMode /* capture_mode */) { 35 NetLogCaptureMode /* capture_mode */) {
36 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 36 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
37 dict->SetString("address", address->ToString()); 37 dict->SetString("address", address->ToString());
38 if (network != NetworkChangeNotifier::kInvalidNetworkHandle) 38 if (network != NetworkChangeNotifier::kInvalidNetworkHandle)
39 dict->SetInteger("bound_to_network", network); 39 dict->SetInteger("bound_to_network", network);
40 return std::move(dict); 40 return std::move(dict);
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 NetLog::ParametersCallback CreateNetLogUDPDataTranferCallback( 45 NetLogParametersCallback CreateNetLogUDPDataTranferCallback(
46 int byte_count, 46 int byte_count,
47 const char* bytes, 47 const char* bytes,
48 const IPEndPoint* address) { 48 const IPEndPoint* address) {
49 DCHECK(bytes); 49 DCHECK(bytes);
50 return base::Bind(&NetLogUDPDataTranferCallback, byte_count, bytes, address); 50 return base::Bind(&NetLogUDPDataTranferCallback, byte_count, bytes, address);
51 } 51 }
52 52
53 NetLog::ParametersCallback CreateNetLogUDPConnectCallback( 53 NetLogParametersCallback CreateNetLogUDPConnectCallback(
54 const IPEndPoint* address, 54 const IPEndPoint* address,
55 NetworkChangeNotifier::NetworkHandle network) { 55 NetworkChangeNotifier::NetworkHandle network) {
56 DCHECK(address); 56 DCHECK(address);
57 return base::Bind(&NetLogUDPConnectCallback, address, network); 57 return base::Bind(&NetLogUDPConnectCallback, address, network);
58 } 58 }
59 59
60 } // namespace net 60 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698