Removes usage of ListWrapper from several files.

BUG=2164
R=andrew@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6269004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5373 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/test/channel_transport/udp_socket_manager_posix.cc b/test/channel_transport/udp_socket_manager_posix.cc
index 5543814..1e13475 100644
--- a/test/channel_transport/udp_socket_manager_posix.cc
+++ b/test/channel_transport/udp_socket_manager_posix.cc
@@ -322,7 +322,7 @@
         return false;
     }
     _critSectList->Enter();
-    _addList.PushBack(s);
+    _addList.push_back(s);
     _critSectList->Leave();
     return true;
 }
@@ -333,26 +333,24 @@
     _critSectList->Enter();
 
     // If the socket is in the add list it's safe to remove and delete it.
-    ListItem* addListItem = _addList.First();
-    while(addListItem)
-    {
-        UdpSocketPosix* addSocket = (UdpSocketPosix*)addListItem->GetItem();
+    for (SocketList::iterator iter = _addList.begin();
+         iter != _addList.end(); ++iter) {
+        UdpSocketPosix* addSocket = static_cast<UdpSocketPosix*>(*iter);
         unsigned int addFD = addSocket->GetFd();
         unsigned int removeFD = static_cast<UdpSocketPosix*>(s)->GetFd();
         if(removeFD == addFD)
         {
-            _removeList.PushBack(removeFD);
+            _removeList.push_back(removeFD);
             _critSectList->Leave();
             return true;
         }
-        addListItem = _addList.Next(addListItem);
     }
 
     // Checking the socket map is safe since all Erase and Insert calls to this
     // map are also protected by _critSectList.
     if (_socketMap.find(static_cast<UdpSocketPosix*>(s)->GetFd()) !=
         _socketMap.end()) {
-      _removeList.PushBack(static_cast<UdpSocketPosix*>(s)->GetFd());
+      _removeList.push_back(static_cast<UdpSocketPosix*>(s)->GetFd());
       _critSectList->Leave();
       return true;
     }
@@ -364,25 +362,23 @@
 {
     // Remove items in remove list.
     _critSectList->Enter();
-    while(!_removeList.Empty())
-    {
+    for (FdList::iterator iter = _removeList.begin();
+         iter != _removeList.end(); ++iter) {
         UdpSocketPosix* deleteSocket = NULL;
-        SOCKET removeFD = _removeList.First()->GetUnsignedItem();
+        SOCKET removeFD = *iter;
 
         // If the socket is in the add list it hasn't been added to the socket
         // map yet. Just remove the socket from the add list.
-        ListItem* addListItem = _addList.First();
-        while(addListItem)
-        {
-            UdpSocketPosix* addSocket = (UdpSocketPosix*)addListItem->GetItem();
+        for (SocketList::iterator iter = _addList.begin();
+             iter != _addList.end(); ++iter) {
+            UdpSocketPosix* addSocket = static_cast<UdpSocketPosix*>(*iter);
             SOCKET addFD = addSocket->GetFd();
             if(removeFD == addFD)
             {
                 deleteSocket = addSocket;
-                _addList.Erase(addListItem);
+                _addList.erase(iter);
                 break;
             }
-            addListItem = _addList.Next(addListItem);
         }
 
         // Find and remove socket from _socketMap.
@@ -398,19 +394,18 @@
             deleteSocket->ReadyForDeletion();
             delete deleteSocket;
         }
-        _removeList.PopFront();
     }
+    _removeList.clear();
 
     // Add sockets from add list.
-    while(!_addList.Empty())
-    {
-        UdpSocketPosix* s =
-            static_cast<UdpSocketPosix*>(_addList.First()->GetItem());
+    for (SocketList::iterator iter = _addList.begin();
+         iter != _addList.end(); ++iter) {
+        UdpSocketPosix* s = static_cast<UdpSocketPosix*>(*iter);
         if(s) {
           _socketMap[s->GetFd()] = s;
         }
-        _addList.PopFront();
     }
+    _addList.clear();
     _critSectList->Leave();
 }