Remove old packet socket factory header.

Bug: webrtc:7447
Change-Id: I367e624070561349a2e98c00d1ce97ad8d12edeb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153347
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29207}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index 56b2283..cc092ef 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -109,7 +109,6 @@
   visibility = [ "*" ]
   cflags = []
   sources = [
-    "async_resolver_factory.h",
     "bitrate_constraints.h",
     "candidate.cc",
     "candidate.h",
@@ -135,7 +134,6 @@
     "media_transport_config.h",
     "media_transport_interface.h",
     "notifier.h",
-    "packet_socket_factory.h",
     "peer_connection_factory_proxy.h",
     "peer_connection_interface.cc",
     "peer_connection_interface.h",
@@ -226,8 +224,6 @@
 rtc_source_set("packet_socket_factory") {
   visibility = [ "*" ]
   sources = [
-    # TODO(bugs.webrtc.org/7447: remove .h files from the api target once
-    # downstream is updated to use the new target.
     "async_resolver_factory.h",
     "packet_socket_factory.h",
   ]
@@ -348,6 +344,7 @@
     ":function_view",
     ":libjingle_peerconnection_api",
     ":network_state_predictor_api",
+    ":packet_socket_factory",
     ":simulated_network_api",
     ":stats_observer_interface",
     ":video_quality_analyzer_api",
@@ -578,6 +575,7 @@
   ]
   deps = [
     ":libjingle_peerconnection_api",
+    ":packet_socket_factory",
     ":scoped_refptr",
     "../p2p:rtc_p2p",
     "../rtc_base",
diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn
index 130d340..75ded56 100644
--- a/p2p/BUILD.gn
+++ b/p2p/BUILD.gn
@@ -58,7 +58,6 @@
     "base/p2p_constants.h",
     "base/p2p_transport_channel.cc",
     "base/p2p_transport_channel.h",
-    "base/packet_socket_factory.h",
     "base/packet_transport_interface.h",
     "base/packet_transport_internal.cc",
     "base/packet_transport_internal.h",
@@ -222,6 +221,7 @@
       ":rtc_p2p",
       ":stun_types",
       "../api:libjingle_peerconnection_api",
+      "../api:packet_socket_factory",
       "../api:scoped_refptr",
       "../api/units:time_delta",
       "../rtc_base",
@@ -255,6 +255,7 @@
   deps = [
     ":rtc_p2p",
     ":stun_types",
+    "../api:packet_socket_factory",
     "../rtc_base",
     "../rtc_base:checks",
     "../rtc_base:rtc_base_tests_utils",
@@ -274,6 +275,7 @@
   deps = [
     ":rtc_p2p",
     ":stun_types",
+    "../api:packet_socket_factory",
     "../rtc_base",
     "../rtc_base:checks",
     "../rtc_base/system:rtc_export",
diff --git a/p2p/base/packet_socket_factory.h b/p2p/base/packet_socket_factory.h
deleted file mode 100644
index 139a778..0000000
--- a/p2p/base/packet_socket_factory.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-// TODO(bugs.webrtc.org/7447): Remove this file once downstream points to the
-// new location in api/.
-
-#ifndef P2P_BASE_PACKET_SOCKET_FACTORY_H_
-#define P2P_BASE_PACKET_SOCKET_FACTORY_H_
-
-#include "api/packet_socket_factory.h"
-
-#endif  // P2P_BASE_PACKET_SOCKET_FACTORY_H_
diff --git a/p2p/base/port.h b/p2p/base/port.h
index 65b543c..dde991a 100644
--- a/p2p/base/port.h
+++ b/p2p/base/port.h
@@ -20,6 +20,7 @@
 
 #include "absl/types/optional.h"
 #include "api/candidate.h"
+#include "api/packet_socket_factory.h"
 #include "api/rtc_error.h"
 #include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
 #include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
@@ -28,7 +29,6 @@
 #include "p2p/base/connection.h"
 #include "p2p/base/connection_info.h"
 #include "p2p/base/p2p_constants.h"
-#include "p2p/base/packet_socket_factory.h"
 #include "p2p/base/port_interface.h"
 #include "p2p/base/stun.h"
 #include "p2p/base/stun_request.h"
diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc
index bef8426..a801f53 100644
--- a/p2p/base/port_unittest.cc
+++ b/p2p/base/port_unittest.cc
@@ -22,10 +22,10 @@
 #include "absl/memory/memory.h"
 #include "absl/types/optional.h"
 #include "api/candidate.h"
+#include "api/packet_socket_factory.h"
 #include "api/units/time_delta.h"
 #include "p2p/base/basic_packet_socket_factory.h"
 #include "p2p/base/p2p_constants.h"
-#include "p2p/base/packet_socket_factory.h"
 #include "p2p/base/port_allocator.h"
 #include "p2p/base/port_interface.h"
 #include "p2p/base/relay_port.h"
diff --git a/p2p/base/turn_server.cc b/p2p/base/turn_server.cc
index e11b646..2892d75 100644
--- a/p2p/base/turn_server.cc
+++ b/p2p/base/turn_server.cc
@@ -15,8 +15,8 @@
 
 #include "absl/algorithm/container.h"
 #include "absl/memory/memory.h"
+#include "api/packet_socket_factory.h"
 #include "p2p/base/async_stun_tcp_socket.h"
-#include "p2p/base/packet_socket_factory.h"
 #include "p2p/base/stun.h"
 #include "rtc_base/bind.h"
 #include "rtc_base/byte_buffer.h"
diff --git a/p2p/stunprober/stun_prober.cc b/p2p/stunprober/stun_prober.cc
index 3968347..49f803f 100644
--- a/p2p/stunprober/stun_prober.cc
+++ b/p2p/stunprober/stun_prober.cc
@@ -16,7 +16,7 @@
 #include <string>
 #include <utility>
 
-#include "p2p/base/packet_socket_factory.h"
+#include "api/packet_socket_factory.h"
 #include "p2p/base/stun.h"
 #include "rtc_base/async_packet_socket.h"
 #include "rtc_base/async_resolver_interface.h"