Use flags set by the port allocator.

Currently, port allocator flags are ignored. This is inconvenient if you
want to have your own PortAllocatorFactory subclass.

BUG=webrtc:3958
R=juberti@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7524 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc
index d939f98..f45ce0b 100644
--- a/talk/app/webrtc/peerconnection.cc
+++ b/talk/app/webrtc/peerconnection.cc
@@ -350,9 +350,10 @@
 
   // To handle both internal and externally created port allocator, we will
   // enable BUNDLE here.
-  int portallocator_flags = cricket::PORTALLOCATOR_ENABLE_BUNDLE |
-                            cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
-                            cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET;
+  int portallocator_flags = port_allocator_->flags();
+  portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_BUNDLE |
+                         cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
+                         cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET;
   bool value;
   // If IPv6 flag was specified, we'll not override it by experiment.
   if (FindConstraint(