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

Side by Side Diff: content/renderer/p2p/ipc_network_manager.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « content/renderer/npapi/webplugin_impl.cc ('k') | content/renderer/pepper/host_globals.cc » ('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 (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 "content/renderer/p2p/ipc_network_manager.h" 5 #include "content/renderer/p2p/ipc_network_manager.h"
6 #include <string> 6 #include <string>
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/sys_byteorder.h" 10 #include "base/sys_byteorder.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 } 108 }
109 109
110 110
111 // Send interface counts to UMA. 111 // Send interface counts to UMA.
112 UMA_HISTOGRAM_COUNTS_100("WebRTC.PeerConnection.IPv4Interfaces", 112 UMA_HISTOGRAM_COUNTS_100("WebRTC.PeerConnection.IPv4Interfaces",
113 ipv4_interfaces); 113 ipv4_interfaces);
114 UMA_HISTOGRAM_COUNTS_100("WebRTC.PeerConnection.IPv6Interfaces", 114 UMA_HISTOGRAM_COUNTS_100("WebRTC.PeerConnection.IPv6Interfaces",
115 ipv6_interfaces); 115 ipv6_interfaces);
116 116
117 if (CommandLine::ForCurrentProcess()->HasSwitch( 117 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
118 switches::kAllowLoopbackInPeerConnection)) { 118 switches::kAllowLoopbackInPeerConnection)) {
119 std::string name_v4("loopback_ipv4"); 119 std::string name_v4("loopback_ipv4");
120 rtc::IPAddress ip_address_v4(INADDR_LOOPBACK); 120 rtc::IPAddress ip_address_v4(INADDR_LOOPBACK);
121 rtc::Network* network_v4 = new rtc::Network( 121 rtc::Network* network_v4 = new rtc::Network(
122 name_v4, name_v4, ip_address_v4, 32, rtc::ADAPTER_TYPE_UNKNOWN); 122 name_v4, name_v4, ip_address_v4, 32, rtc::ADAPTER_TYPE_UNKNOWN);
123 network_v4->AddIP(ip_address_v4); 123 network_v4->AddIP(ip_address_v4);
124 networks.push_back(network_v4); 124 networks.push_back(network_v4);
125 125
126 std::string name_v6("loopback_ipv6"); 126 std::string name_v6("loopback_ipv6");
127 rtc::IPAddress ip_address_v6(in6addr_loopback); 127 rtc::IPAddress ip_address_v6(in6addr_loopback);
128 rtc::Network* network_v6 = new rtc::Network( 128 rtc::Network* network_v6 = new rtc::Network(
129 name_v6, name_v6, ip_address_v6, 64, rtc::ADAPTER_TYPE_UNKNOWN); 129 name_v6, name_v6, ip_address_v6, 64, rtc::ADAPTER_TYPE_UNKNOWN);
130 network_v6->AddIP(ip_address_v6); 130 network_v6->AddIP(ip_address_v6);
131 networks.push_back(network_v6); 131 networks.push_back(network_v6);
132 } 132 }
133 133
134 bool changed = false; 134 bool changed = false;
135 MergeNetworkList(networks, &changed); 135 MergeNetworkList(networks, &changed);
136 if (changed) 136 if (changed)
137 SignalNetworksChanged(); 137 SignalNetworksChanged();
138 } 138 }
139 139
140 void IpcNetworkManager::SendNetworksChangedSignal() { 140 void IpcNetworkManager::SendNetworksChangedSignal() {
141 SignalNetworksChanged(); 141 SignalNetworksChanged();
142 } 142 }
143 143
144 } // namespace content 144 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/npapi/webplugin_impl.cc ('k') | content/renderer/pepper/host_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698