| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 virtual void StopUpdating() { | 72 virtual void StopUpdating() { |
| 73 started_ = false; | 73 started_ = false; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // MessageHandler interface. | 76 // MessageHandler interface. |
| 77 virtual void OnMessage(Message* msg) { | 77 virtual void OnMessage(Message* msg) { |
| 78 DoUpdateNetworks(); | 78 DoUpdateNetworks(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 using NetworkManagerBase::set_enumeration_permission; | |
| 82 | |
| 83 private: | 81 private: |
| 84 void DoUpdateNetworks() { | 82 void DoUpdateNetworks() { |
| 85 if (!started_) | 83 if (!started_) |
| 86 return; | 84 return; |
| 87 std::vector<Network*> networks; | 85 std::vector<Network*> networks; |
| 88 for (IfaceList::iterator it = ifaces_.begin(); | 86 for (IfaceList::iterator it = ifaces_.begin(); |
| 89 it != ifaces_.end(); ++it) { | 87 it != ifaces_.end(); ++it) { |
| 90 int prefix_length = 0; | 88 int prefix_length = 0; |
| 91 if (it->ipaddr().family() == AF_INET) { | 89 if (it->ipaddr().family() == AF_INET) { |
| 92 prefix_length = kFakeIPv4NetworkPrefixLength; | 90 prefix_length = kFakeIPv4NetworkPrefixLength; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 112 Thread* thread_; | 110 Thread* thread_; |
| 113 IfaceList ifaces_; | 111 IfaceList ifaces_; |
| 114 int next_index_; | 112 int next_index_; |
| 115 bool started_; | 113 bool started_; |
| 116 bool sent_first_update_; | 114 bool sent_first_update_; |
| 117 }; | 115 }; |
| 118 | 116 |
| 119 } // namespace rtc | 117 } // namespace rtc |
| 120 | 118 |
| 121 #endif // WEBRTC_BASE_FAKENETWORK_H_ | 119 #endif // WEBRTC_BASE_FAKENETWORK_H_ |
| OLD | NEW |