Make WebRTC use third_party/libevent rather than base/third_party/libevent

Bug: chromium:1335194
Change-Id: I084b391b42e2496163ea625c0bdc9255177e5603
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266680
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37375}
diff --git a/DEPS b/DEPS
index 8a0208e..6927d80 100644
--- a/DEPS
+++ b/DEPS
@@ -24,8 +24,7 @@
 }
 
 deps = {
-  # TODO(kjellander): Move this to be Android-only once the libevent dependency
-  # in base/third_party/libevent is solved.
+  # TODO(kjellander): Move this to be Android-only.
   'src/base':
     'https://chromium.googlesource.com/chromium/src/base@2f3d3763f35854e8436ad0f4acced5a6762b772a',
   'src/build':
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index c8e23a8..c997073 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -649,7 +649,7 @@
       "//third_party/abseil-cpp/absl/strings",
     ]
     if (rtc_build_libevent) {
-      deps += [ "//base/third_party/libevent" ]
+      deps += [ "//third_party/libevent" ]
     }
   }
 }
diff --git a/rtc_base/DEPS b/rtc_base/DEPS
index c9f7dc5..3a77b55 100644
--- a/rtc_base/DEPS
+++ b/rtc_base/DEPS
@@ -1,8 +1,8 @@
 include_rules = [
-  "+base/third_party/libevent",
   "+json",
   "+system_wrappers",
   "+third_party/jsoncpp",
+  "+third_party/libevent",
 ]
 
 specific_include_rules = {
diff --git a/rtc_base/task_queue_libevent.cc b/rtc_base/task_queue_libevent.cc
index 4f56400..ba80a64 100644
--- a/rtc_base/task_queue_libevent.cc
+++ b/rtc_base/task_queue_libevent.cc
@@ -27,7 +27,6 @@
 #include "absl/strings/string_view.h"
 #include "api/task_queue/queued_task.h"
 #include "api/task_queue/task_queue_base.h"
-#include "base/third_party/libevent/event.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
@@ -36,6 +35,7 @@
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
 #include "rtc_base/time_utils.h"
+#include "third_party/libevent/event.h"
 
 namespace webrtc {
 namespace {
diff --git a/tools_webrtc/libs/generate_licenses.py b/tools_webrtc/libs/generate_licenses.py
index bcc6890..f888a53 100755
--- a/tools_webrtc/libs/generate_licenses.py
+++ b/tools_webrtc/libs/generate_licenses.py
@@ -53,8 +53,7 @@
     'libaom': ['third_party/libaom/source/libaom/LICENSE'],
     'libc++': ['buildtools/third_party/libc++/trunk/LICENSE.TXT'],
     'libc++abi': ['buildtools/third_party/libc++abi/trunk/LICENSE.TXT'],
-    'libevent':
-    ['base/third_party/libevent/LICENSE', 'third_party/libevent/LICENSE'],
+    'libevent': ['third_party/libevent/LICENSE'],
     'libjpeg_turbo': ['third_party/libjpeg_turbo/LICENSE.md'],
     'libsrtp': ['third_party/libsrtp/LICENSE'],
     'libunwind': ['buildtools/third_party/libunwind/trunk/LICENSE.TXT'],
@@ -221,9 +220,6 @@
       output_license_file.write('```\n')
       for path in self.common_licenses_dict[license_lib]:
         license_path = os.path.join(WEBRTC_ROOT, path)
-        # TODO(crbug.com/1335194) Workaround for unblocking autoroller.
-        if license_lib == "libevent" and not os.path.exists(license_path):
-          continue
         with open(license_path, 'r') as license_file:
           license_text = escape(license_file.read(), quote=True)
           output_license_file.write(license_text)