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

Side by Side Diff: webrtc/base/network_unittest.cc

Issue 1594673002: Get the adapter type information from Android OS. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments Created 4 years, 10 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 | « webrtc/base/network.cc ('k') | webrtc/base/networkmonitor.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 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 namespace rtc { 26 namespace rtc {
27 27
28 namespace { 28 namespace {
29 29
30 class FakeNetworkMonitor : public NetworkMonitorBase { 30 class FakeNetworkMonitor : public NetworkMonitorBase {
31 public: 31 public:
32 void Start() override { started_ = true; } 32 void Start() override { started_ = true; }
33 void Stop() override { started_ = false; } 33 void Stop() override { started_ = false; }
34 bool started() { return started_; } 34 bool started() { return started_; }
35 AdapterType GetAdapterType(const std::string& if_name) override {
36 return ADAPTER_TYPE_UNKNOWN;
37 }
35 38
36 private: 39 private:
37 bool started_ = false; 40 bool started_ = false;
38 }; 41 };
39 42
40 class FakeNetworkMonitorFactory : public NetworkMonitorFactory { 43 class FakeNetworkMonitorFactory : public NetworkMonitorFactory {
41 public: 44 public:
42 FakeNetworkMonitorFactory() {} 45 FakeNetworkMonitorFactory() {}
43 NetworkMonitorInterface* CreateNetworkMonitor() override { 46 NetworkMonitorInterface* CreateNetworkMonitor() override {
44 return new FakeNetworkMonitor(); 47 return new FakeNetworkMonitor();
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 manager.set_default_local_addresses(GetLoopbackIP(AF_INET), 977 manager.set_default_local_addresses(GetLoopbackIP(AF_INET),
975 GetLoopbackIP(AF_INET6)); 978 GetLoopbackIP(AF_INET6));
976 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET, &ip)); 979 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET, &ip));
977 EXPECT_EQ(ip, GetLoopbackIP(AF_INET)); 980 EXPECT_EQ(ip, GetLoopbackIP(AF_INET));
978 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip)); 981 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip));
979 EXPECT_EQ(ip, GetLoopbackIP(AF_INET6)); 982 EXPECT_EQ(ip, GetLoopbackIP(AF_INET6));
980 manager.StopUpdating(); 983 manager.StopUpdating();
981 } 984 }
982 985
983 } // namespace rtc 986 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/network.cc ('k') | webrtc/base/networkmonitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698