Remove rtc::Location from SendTask test helper

that rtc::Location parameter was used only as extra information for the
RTC_CHECKs directly in the function, thus call stack of the crash should
provide all the information about the caller.

Bug: webrtc:11318
Change-Id: Iec6dd2c5de547f3e1601647a614be7ce57a55734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270920
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37748}
diff --git a/video/BUILD.gn b/video/BUILD.gn
index 64308ad..5176e13 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -868,7 +868,6 @@
       "../rtc_base:byte_buffer",
       "../rtc_base:checks",
       "../rtc_base:gunit_helpers",
-      "../rtc_base:location",
       "../rtc_base:logging",
       "../rtc_base:macromagic",
       "../rtc_base:platform_thread",
diff --git a/video/adaptation/overuse_frame_detector_unittest.cc b/video/adaptation/overuse_frame_detector_unittest.cc
index e607a04..ff1f4d8 100644
--- a/video/adaptation/overuse_frame_detector_unittest.cc
+++ b/video/adaptation/overuse_frame_detector_unittest.cc
@@ -432,12 +432,9 @@
 TEST_F(OveruseFrameDetectorTest, RunOnTqNormalUsage) {
   TaskQueueForTest queue("OveruseFrameDetectorTestQueue");
 
-  queue.SendTask(
-      [&] {
-        overuse_detector_->StartCheckForOveruse(queue.Get(), options_,
-                                                observer_);
-      },
-      RTC_FROM_HERE);
+  queue.SendTask([&] {
+    overuse_detector_->StartCheckForOveruse(queue.Get(), options_, observer_);
+  });
 
   rtc::Event event;
   // Expect NormalUsage(). When called, stop the `overuse_detector_` and then
@@ -917,12 +914,9 @@
 TEST_F(OveruseFrameDetectorTest2, RunOnTqNormalUsage) {
   TaskQueueForTest queue("OveruseFrameDetectorTestQueue");
 
-  queue.SendTask(
-      [&] {
-        overuse_detector_->StartCheckForOveruse(queue.Get(), options_,
-                                                observer_);
-      },
-      RTC_FROM_HERE);
+  queue.SendTask([&] {
+    overuse_detector_->StartCheckForOveruse(queue.Get(), options_, observer_);
+  });
 
   rtc::Event event;
   // Expect NormalUsage(). When called, stop the `overuse_detector_` and then
diff --git a/video/end_to_end_tests/bandwidth_tests.cc b/video/end_to_end_tests/bandwidth_tests.cc
index c21b3ba..c5488ea 100644
--- a/video/end_to_end_tests/bandwidth_tests.cc
+++ b/video/end_to_end_tests/bandwidth_tests.cc
@@ -95,7 +95,7 @@
   ~BandwidthStatsTest() override {
     // Block until all already posted tasks run to avoid races when such task
     // accesses `this`.
-    SendTask(RTC_FROM_HERE, task_queue_, [] {});
+    SendTask(task_queue_, [] {});
   }
 
   void ModifyVideoConfigs(
@@ -358,7 +358,7 @@
       ASSERT_TRUE(Wait())
           << "Timed out while waiting for encoder SetRates() call.";
 
-      SendTask(RTC_FROM_HERE, task_queue_, [this]() {
+      SendTask(task_queue_, [this]() {
         WaitForEncoderTargetBitrateMatchStats();
         send_stream_->Stop();
         WaitForStatsReportZeroTargetBitrate();
diff --git a/video/end_to_end_tests/call_operation_tests.cc b/video/end_to_end_tests/call_operation_tests.cc
index fcf7660..5c87bc1 100644
--- a/video/end_to_end_tests/call_operation_tests.cc
+++ b/video/end_to_end_tests/call_operation_tests.cc
@@ -98,9 +98,8 @@
   std::unique_ptr<test::DirectTransport> receiver_transport;
 
   SendTask(
-      RTC_FROM_HERE, task_queue(),
-      [this, &renderer, &frame_forwarder, &sender_transport,
-       &receiver_transport]() {
+      task_queue(), [this, &renderer, &frame_forwarder, &sender_transport,
+                     &receiver_transport]() {
         CreateCalls();
 
         sender_transport = std::make_unique<test::DirectTransport>(
@@ -146,14 +145,13 @@
   EXPECT_TRUE(renderer.Wait())
       << "Timed out while waiting for the frame to render.";
 
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &sender_transport, &receiver_transport]() {
-             Stop();
-             DestroyStreams();
-             sender_transport.reset();
-             receiver_transport.reset();
-             DestroyCalls();
-           });
+  SendTask(task_queue(), [this, &sender_transport, &receiver_transport]() {
+    Stop();
+    DestroyStreams();
+    sender_transport.reset();
+    receiver_transport.reset();
+    DestroyCalls();
+  });
 }
 
 TEST_F(CallOperationEndToEndTest, TransmitsFirstFrame) {
@@ -173,9 +171,8 @@
   std::unique_ptr<test::DirectTransport> receiver_transport;
 
   SendTask(
-      RTC_FROM_HERE, task_queue(),
-      [this, &renderer, &frame_generator, &frame_forwarder, &sender_transport,
-       &receiver_transport]() {
+      task_queue(), [this, &renderer, &frame_generator, &frame_forwarder,
+                     &sender_transport, &receiver_transport]() {
         CreateCalls();
 
         sender_transport = std::make_unique<test::DirectTransport>(
@@ -216,14 +213,13 @@
   EXPECT_TRUE(renderer.Wait())
       << "Timed out while waiting for the frame to render.";
 
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &sender_transport, &receiver_transport]() {
-             Stop();
-             DestroyStreams();
-             sender_transport.reset();
-             receiver_transport.reset();
-             DestroyCalls();
-           });
+  SendTask(task_queue(), [this, &sender_transport, &receiver_transport]() {
+    Stop();
+    DestroyStreams();
+    sender_transport.reset();
+    receiver_transport.reset();
+    DestroyCalls();
+  });
 }
 
 }  // namespace webrtc
diff --git a/video/end_to_end_tests/multi_codec_receive_tests.cc b/video/end_to_end_tests/multi_codec_receive_tests.cc
index d9d7821..e397402 100644
--- a/video/end_to_end_tests/multi_codec_receive_tests.cc
+++ b/video/end_to_end_tests/multi_codec_receive_tests.cc
@@ -129,7 +129,7 @@
 class MultiCodecReceiveTest : public test::CallTest {
  public:
   MultiCodecReceiveTest() {
-    SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+    SendTask(task_queue(), [this]() {
       CreateCalls();
 
       send_transport_.reset(new test::PacketTransport(
@@ -151,7 +151,7 @@
   }
 
   virtual ~MultiCodecReceiveTest() {
-    SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+    SendTask(task_queue(), [this]() {
       send_transport_.reset();
       receive_transport_.reset();
       DestroyCalls();
@@ -243,7 +243,7 @@
         return nullptr;
       });
   // Create and start call.
-  SendTask(RTC_FROM_HERE, task_queue(),
+  SendTask(task_queue(),
            [this, &configs, &encoder_factory, &decoder_factory]() {
              CreateSendConfig(1, 0, 0, send_transport_.get());
              ConfigureEncoder(configs[0], &encoder_factory);
@@ -261,21 +261,20 @@
 
   for (size_t i = 1; i < configs.size(); ++i) {
     // Recreate VideoSendStream with new config (codec, temporal layers).
-    SendTask(
-        RTC_FROM_HERE, task_queue(), [this, i, &configs, &encoder_factory]() {
-          DestroyVideoSendStreams();
-          observer_.Reset(PayloadNameToPayloadType(configs[i].payload_name));
+    SendTask(task_queue(), [this, i, &configs, &encoder_factory]() {
+      DestroyVideoSendStreams();
+      observer_.Reset(PayloadNameToPayloadType(configs[i].payload_name));
 
-          ConfigureEncoder(configs[i], &encoder_factory);
-          CreateVideoSendStreams();
-          GetVideoSendStream()->Start();
-          CreateFrameGeneratorCapturer(kFps, kWidth / 2, kHeight / 2);
-          ConnectVideoSourcesToStreams();
-        });
+      ConfigureEncoder(configs[i], &encoder_factory);
+      CreateVideoSendStreams();
+      GetVideoSendStream()->Start();
+      CreateFrameGeneratorCapturer(kFps, kWidth / 2, kHeight / 2);
+      ConnectVideoSourcesToStreams();
+    });
     EXPECT_TRUE(observer_.Wait()) << "Timed out waiting for frames.";
   }
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     Stop();
     DestroyStreams();
   });
diff --git a/video/end_to_end_tests/multi_stream_tester.cc b/video/end_to_end_tests/multi_stream_tester.cc
index 8ca06d7..b455672 100644
--- a/video/end_to_end_tests/multi_stream_tester.cc
+++ b/video/end_to_end_tests/multi_stream_tester.cc
@@ -67,7 +67,7 @@
       CreateBuiltinVideoBitrateAllocatorFactory();
   InternalDecoderFactory decoder_factory;
 
-  SendTask(RTC_FROM_HERE, task_queue.get(), [&]() {
+  SendTask(task_queue.get(), [&]() {
     sender_call = absl::WrapUnique(Call::Create(config));
     receiver_call = absl::WrapUnique(Call::Create(config));
     sender_transport = CreateSendTransport(task_queue.get(), sender_call.get());
@@ -129,7 +129,7 @@
 
   Wait();
 
-  SendTask(RTC_FROM_HERE, task_queue.get(), [&]() {
+  SendTask(task_queue.get(), [&]() {
     for (size_t i = 0; i < kNumStreams; ++i) {
       frame_generators[i]->Stop();
       sender_call->DestroyVideoSendStream(send_streams[i]);
diff --git a/video/end_to_end_tests/network_state_tests.cc b/video/end_to_end_tests/network_state_tests.cc
index 3618673..fdb0b18 100644
--- a/video/end_to_end_tests/network_state_tests.cc
+++ b/video/end_to_end_tests/network_state_tests.cc
@@ -19,7 +19,6 @@
 #include "call/fake_network_pipe.h"
 #include "call/simulated_network.h"
 #include "modules/rtp_rtcp/source/rtp_packet.h"
-#include "rtc_base/location.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/task_queue_for_test.h"
 #include "system_wrappers/include/sleep.h"
@@ -95,7 +94,7 @@
     Transport* transport) {
   test::VideoEncoderProxyFactory encoder_factory(encoder);
 
-  SendTask(RTC_FROM_HERE, task_queue(),
+  SendTask(task_queue(),
            [this, network_to_bring_up, &encoder_factory, transport]() {
              CreateSenderCall(Call::Config(send_event_log_.get()));
              sender_call_->SignalChannelNetworkState(network_to_bring_up,
@@ -113,7 +112,7 @@
 
   SleepMs(kSilenceTimeoutMs);
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     Stop();
     DestroyStreams();
     DestroyCalls();
@@ -126,7 +125,7 @@
   std::unique_ptr<test::DirectTransport> sender_transport;
 
   SendTask(
-      RTC_FROM_HERE, task_queue(),
+      task_queue(),
       [this, &sender_transport, network_to_bring_up, transport]() {
         CreateCalls();
         receiver_call_->SignalChannelNetworkState(network_to_bring_up,
@@ -148,7 +147,7 @@
 
   SleepMs(kSilenceTimeoutMs);
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this, &sender_transport]() {
+  SendTask(task_queue(), [this, &sender_transport]() {
     Stop();
     DestroyStreams();
     sender_transport.reset();
@@ -230,17 +229,16 @@
     void SignalChannelNetworkState(Call* call,
                                    MediaType media_type,
                                    NetworkState network_state) {
-      SendTask(RTC_FROM_HERE, e2e_test_task_queue_,
-               [call, media_type, network_state] {
-                 call->SignalChannelNetworkState(media_type, network_state);
-               });
+      SendTask(e2e_test_task_queue_, [call, media_type, network_state] {
+        call->SignalChannelNetworkState(media_type, network_state);
+      });
     }
 
     void PerformTest() override {
       EXPECT_TRUE(encoded_frames_.Wait(kDefaultTimeoutMs))
           << "No frames received by the encoder.";
 
-      SendTask(RTC_FROM_HERE, task_queue_.get(), [this]() {
+      SendTask(task_queue_.get(), [this]() {
         // Wait for packets from both sender/receiver.
         WaitForPacketsOrSilence(false, false);
 
diff --git a/video/end_to_end_tests/rtp_rtcp_tests.cc b/video/end_to_end_tests/rtp_rtcp_tests.cc
index fe59bfc..02672ef 100644
--- a/video/end_to_end_tests/rtp_rtcp_tests.cc
+++ b/video/end_to_end_tests/rtp_rtcp_tests.cc
@@ -284,9 +284,8 @@
   VideoEncoderConfig one_stream;
 
   SendTask(
-      RTC_FROM_HERE, task_queue(),
-      [this, &observer, &send_transport, &receive_transport, &one_stream,
-       use_rtx]() {
+      task_queue(), [this, &observer, &send_transport, &receive_transport,
+                     &one_stream, use_rtx]() {
         CreateCalls();
 
         send_transport = std::make_unique<test::PacketTransport>(
@@ -336,7 +335,7 @@
   // Test stream resetting more than once to make sure that the state doesn't
   // get set once (this could be due to using std::map::insert for instance).
   for (size_t i = 0; i < 3; ++i) {
-    SendTask(RTC_FROM_HERE, task_queue(), [&]() {
+    SendTask(task_queue(), [&]() {
       DestroyVideoSendStreams();
 
       // Re-create VideoSendStream with only one stream.
@@ -358,7 +357,7 @@
     EXPECT_TRUE(observer.Wait()) << "Timed out waiting for single RTP packet.";
 
     // Reconfigure back to use all streams.
-    SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+    SendTask(task_queue(), [this]() {
       GetVideoSendStream()->ReconfigureVideoEncoder(
           GetVideoEncoderConfig()->Copy());
     });
@@ -367,14 +366,14 @@
         << "Timed out waiting for all SSRCs to send packets.";
 
     // Reconfigure down to one stream.
-    SendTask(RTC_FROM_HERE, task_queue(), [this, &one_stream]() {
+    SendTask(task_queue(), [this, &one_stream]() {
       GetVideoSendStream()->ReconfigureVideoEncoder(one_stream.Copy());
     });
     observer.ResetExpectedSsrcs(1);
     EXPECT_TRUE(observer.Wait()) << "Timed out waiting for single RTP packet.";
 
     // Reconfigure back to use all streams.
-    SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+    SendTask(task_queue(), [this]() {
       GetVideoSendStream()->ReconfigureVideoEncoder(
           GetVideoEncoderConfig()->Copy());
     });
@@ -383,14 +382,13 @@
         << "Timed out waiting for all SSRCs to send packets.";
   }
 
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &send_transport, &receive_transport]() {
-             Stop();
-             DestroyStreams();
-             send_transport.reset();
-             receive_transport.reset();
-             DestroyCalls();
-           });
+  SendTask(task_queue(), [this, &send_transport, &receive_transport]() {
+    Stop();
+    DestroyStreams();
+    send_transport.reset();
+    receive_transport.reset();
+    DestroyCalls();
+  });
 }
 
 TEST_F(RtpRtcpEndToEndTest, RestartingSendStreamPreservesRtpState) {
@@ -484,7 +482,7 @@
   test::FunctionVideoEncoderFactory encoder_factory(
       []() { return VP8Encoder::Create(); });
 
-  SendTask(RTC_FROM_HERE, task_queue(), [&]() {
+  SendTask(task_queue(), [&]() {
     CreateCalls();
 
     BuiltInNetworkBehaviorConfig lossy_delayed_link;
@@ -563,7 +561,7 @@
   // Initial test.
   EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets.";
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this, &observer]() {
+  SendTask(task_queue(), [this, &observer]() {
     // Ensure monotonicity when the VideoSendStream is restarted.
     Stop();
     observer.ResetPacketCount();
@@ -572,7 +570,7 @@
 
   EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets.";
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this, &observer]() {
+  SendTask(task_queue(), [this, &observer]() {
     // Ensure monotonicity when the VideoSendStream is recreated.
     DestroyVideoSendStreams();
     observer.ResetPacketCount();
@@ -584,13 +582,12 @@
   EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets.";
 
   // Cleanup.
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &send_transport, &receive_transport]() {
-             Stop();
-             DestroyStreams();
-             send_transport.reset();
-             receive_transport.reset();
-             DestroyCalls();
-           });
+  SendTask(task_queue(), [this, &send_transport, &receive_transport]() {
+    Stop();
+    DestroyStreams();
+    send_transport.reset();
+    receive_transport.reset();
+    DestroyCalls();
+  });
 }
 }  // namespace webrtc
diff --git a/video/end_to_end_tests/ssrc_tests.cc b/video/end_to_end_tests/ssrc_tests.cc
index a39e3e2..ea5a887 100644
--- a/video/end_to_end_tests/ssrc_tests.cc
+++ b/video/end_to_end_tests/ssrc_tests.cc
@@ -81,7 +81,7 @@
   std::unique_ptr<PacketInputObserver> input_observer;
 
   SendTask(
-      RTC_FROM_HERE, task_queue(),
+      task_queue(),
       [this, &send_transport, &receive_transport, &input_observer]() {
         CreateCalls();
 
@@ -117,14 +117,13 @@
   // Wait() waits for a received packet.
   EXPECT_TRUE(input_observer->Wait());
 
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &send_transport, &receive_transport]() {
-             Stop();
-             DestroyStreams();
-             send_transport.reset();
-             receive_transport.reset();
-             DestroyCalls();
-           });
+  SendTask(task_queue(), [this, &send_transport, &receive_transport]() {
+    Stop();
+    DestroyStreams();
+    send_transport.reset();
+    receive_transport.reset();
+    DestroyCalls();
+  });
 }
 
 void SsrcEndToEndTest::TestSendsSetSsrcs(size_t num_ssrcs,
@@ -203,7 +202,7 @@
 
       if (send_single_ssrc_first_) {
         // Set full simulcast and continue with the rest of the SSRCs.
-        SendTask(RTC_FROM_HERE, task_queue_, [&]() {
+        SendTask(task_queue_, [&]() {
           send_stream_->ReconfigureVideoEncoder(
               std::move(video_encoder_config_all_streams_));
         });
diff --git a/video/end_to_end_tests/stats_tests.cc b/video/end_to_end_tests/stats_tests.cc
index d1df83a..b44cc0a 100644
--- a/video/end_to_end_tests/stats_tests.cc
+++ b/video/end_to_end_tests/stats_tests.cc
@@ -145,8 +145,7 @@
       RTC_DCHECK(send_stream_);
 
       VideoSendStream::Stats stats;
-      SendTask(RTC_FROM_HERE, task_queue_,
-               [&]() { stats = send_stream_->GetStats(); });
+      SendTask(task_queue_, [&]() { stats = send_stream_->GetStats(); });
 
       size_t expected_num_streams =
           kNumSimulcastStreams + expected_send_ssrcs_.size();
@@ -299,8 +298,7 @@
 
       while (now_ms < stop_time_ms) {
         if (!receive_ok && task_queue_) {
-          SendTask(RTC_FROM_HERE, task_queue_,
-                   [&]() { receive_ok = CheckReceiveStats(); });
+          SendTask(task_queue_, [&]() { receive_ok = CheckReceiveStats(); });
         }
         if (!send_ok)
           send_ok = CheckSendStats();
@@ -375,7 +373,7 @@
 
     void PerformTest() override {
       // No frames reported initially.
-      SendTask(RTC_FROM_HERE, task_queue_, [&]() {
+      SendTask(task_queue_, [&]() {
         for (const auto& receive_stream : receive_streams_) {
           EXPECT_FALSE(receive_stream->GetStats().timing_frame_info);
         }
@@ -383,7 +381,7 @@
       // Wait for at least one timing frame to be sent with 100ms grace period.
       SleepMs(kDefaultTimingFramesDelayMs + 100);
       // Check that timing frames are reported for each stream.
-      SendTask(RTC_FROM_HERE, task_queue_, [&]() {
+      SendTask(task_queue_, [&]() {
         for (const auto& receive_stream : receive_streams_) {
           EXPECT_TRUE(receive_stream->GetStats().timing_frame_info);
         }
@@ -507,9 +505,8 @@
   VideoEncoderConfig encoder_config_with_screenshare;
 
   SendTask(
-      RTC_FROM_HERE, task_queue(),
-      [this, &test, &send_config, &recv_config,
-       &encoder_config_with_screenshare]() {
+      task_queue(), [this, &test, &send_config, &recv_config,
+                     &encoder_config_with_screenshare]() {
         CreateSenderCall(send_config);
         CreateReceiverCall(recv_config);
 
@@ -547,18 +544,17 @@
   test.PerformTest();
 
   // Replace old send stream.
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &encoder_config_with_screenshare]() {
-             DestroyVideoSendStreams();
-             CreateVideoSendStream(encoder_config_with_screenshare);
-             SetVideoDegradation(DegradationPreference::BALANCED);
-             GetVideoSendStream()->Start();
-           });
+  SendTask(task_queue(), [this, &encoder_config_with_screenshare]() {
+    DestroyVideoSendStreams();
+    CreateVideoSendStream(encoder_config_with_screenshare);
+    SetVideoDegradation(DegradationPreference::BALANCED);
+    GetVideoSendStream()->Start();
+  });
 
   // Continue to run test but now with screenshare.
   test.PerformTest();
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     Stop();
     DestroyStreams();
     send_transport_.reset();
@@ -700,7 +696,7 @@
   std::unique_ptr<test::DirectTransport> sender_transport;
   std::unique_ptr<test::DirectTransport> receiver_transport;
 
-  SendTask(RTC_FROM_HERE, task_queue(),
+  SendTask(task_queue(),
            [this, &sender_transport, &receiver_transport]() {
              BuiltInNetworkBehaviorConfig config;
              config.queue_delay_ms = kSendDelayMs;
@@ -733,7 +729,7 @@
   int64_t start_time_ms = clock_->TimeInMilliseconds();
   while (true) {
     Call::Stats stats;
-    SendTask(RTC_FROM_HERE, task_queue(),
+    SendTask(task_queue(),
              [this, &stats]() { stats = sender_call_->GetStats(); });
     ASSERT_GE(start_time_ms + kDefaultTimeoutMs, clock_->TimeInMilliseconds())
         << "No RTT stats before timeout!";
@@ -747,13 +743,12 @@
     SleepMs(10);
   }
 
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &sender_transport, &receiver_transport]() {
-             Stop();
-             DestroyStreams();
-             sender_transport.reset();
-             receiver_transport.reset();
-             DestroyCalls();
-           });
+  SendTask(task_queue(), [this, &sender_transport, &receiver_transport]() {
+    Stop();
+    DestroyStreams();
+    sender_transport.reset();
+    receiver_transport.reset();
+    DestroyCalls();
+  });
 }
 }  // namespace webrtc
diff --git a/video/picture_id_tests.cc b/video/picture_id_tests.cc
index 85b7f8a..7d0a076 100644
--- a/video/picture_id_tests.cc
+++ b/video/picture_id_tests.cc
@@ -217,7 +217,7 @@
   PictureIdTest() : num_temporal_layers_(GetParam()) {}
 
   virtual ~PictureIdTest() {
-    SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+    SendTask(task_queue(), [this]() {
       send_transport_.reset();
       receive_transport_.reset();
       DestroyCalls();
@@ -254,7 +254,7 @@
       new PictureIdObserver(PayloadStringToCodecType(payload_name)));
 
   SendTask(
-      RTC_FROM_HERE, task_queue(), [this, encoder_factory, payload_name]() {
+      task_queue(), [this, encoder_factory, payload_name]() {
         CreateCalls();
 
         send_transport_.reset(new test::PacketTransport(
@@ -299,7 +299,7 @@
 
 void PictureIdTest::TestPictureIdContinuousAfterReconfigure(
     const std::vector<int>& ssrc_counts) {
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     CreateVideoStreams();
     CreateFrameGeneratorCapturer(kFrameRate, kFrameMaxWidth, kFrameMaxHeight);
 
@@ -317,14 +317,14 @@
     observer_->SetExpectedSsrcs(ssrc_count);
     observer_->ResetObservedSsrcs();
     // Make sure the picture_id sequence is continuous on reinit and recreate.
-    SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+    SendTask(task_queue(), [this]() {
       GetVideoSendStream()->ReconfigureVideoEncoder(
           GetVideoEncoderConfig()->Copy());
     });
     EXPECT_TRUE(observer_->Wait()) << "Timed out waiting for packets.";
   }
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     Stop();
     DestroyStreams();
   });
@@ -332,7 +332,7 @@
 
 void PictureIdTest::TestPictureIdIncreaseAfterRecreateStreams(
     const std::vector<int>& ssrc_counts) {
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     CreateVideoStreams();
     CreateFrameGeneratorCapturer(kFrameRate, kFrameMaxWidth, kFrameMaxHeight);
 
@@ -347,7 +347,7 @@
   // with it, therefore it is expected that some frames might be lost.
   observer_->SetMaxExpectedPictureIdGap(kMaxFramesLost);
   for (int ssrc_count : ssrc_counts) {
-    SendTask(RTC_FROM_HERE, task_queue(), [this, &ssrc_count]() {
+    SendTask(task_queue(), [this, &ssrc_count]() {
       DestroyVideoSendStreams();
 
       SetVideoEncoderConfig(ssrc_count);
@@ -362,7 +362,7 @@
     EXPECT_TRUE(observer_->Wait()) << "Timed out waiting for packets.";
   }
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     Stop();
     DestroyStreams();
   });
diff --git a/video/video_analyzer.cc b/video/video_analyzer.cc
index 311fd31..7e533ee 100644
--- a/video/video_analyzer.cc
+++ b/video/video_analyzer.cc
@@ -397,7 +397,7 @@
   if (iteration > 0)
     printf("- Farewell, sweet Concorde!\n");
 
-  SendTask(RTC_FROM_HERE, task_queue_, [&] { stats_polling_task.Stop(); });
+  SendTask(task_queue_, [&] { stats_polling_task.Stop(); });
 
   PrintResults();
   if (graph_data_output_file_)
diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc
index 087eb3c..1b5b3a8 100644
--- a/video/video_quality_test.cc
+++ b/video/video_quality_test.cc
@@ -278,7 +278,7 @@
 
   while (!_kbhit() || _getch() != '\r') {
     // Drive the message loop for the thread running the task_queue
-    SendTask(RTC_FROM_HERE, task_queue, [&]() {
+    SendTask(task_queue, [&]() {
       MSG msg;
       if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
         TranslateMessage(&msg);
@@ -1237,20 +1237,19 @@
     recv_event_log_ = std::make_unique<RtcEventLogNull>();
   }
 
-  SendTask(RTC_FROM_HERE, task_queue(),
-           [this, &params, &send_transport, &recv_transport]() {
-             Call::Config send_call_config(send_event_log_.get());
-             Call::Config recv_call_config(recv_event_log_.get());
-             send_call_config.bitrate_config = params.call.call_bitrate_config;
-             recv_call_config.bitrate_config = params.call.call_bitrate_config;
-             if (params_.audio.enabled)
-               InitializeAudioDevice(&send_call_config, &recv_call_config,
-                                     params_.audio.use_real_adm);
+  SendTask(task_queue(), [this, &params, &send_transport, &recv_transport]() {
+    Call::Config send_call_config(send_event_log_.get());
+    Call::Config recv_call_config(recv_event_log_.get());
+    send_call_config.bitrate_config = params.call.call_bitrate_config;
+    recv_call_config.bitrate_config = params.call.call_bitrate_config;
+    if (params_.audio.enabled)
+      InitializeAudioDevice(&send_call_config, &recv_call_config,
+                            params_.audio.use_real_adm);
 
-             CreateCalls(send_call_config, recv_call_config);
-             send_transport = CreateSendTransport();
-             recv_transport = CreateReceiveTransport();
-           });
+    CreateCalls(send_call_config, recv_call_config);
+    send_transport = CreateSendTransport();
+    recv_transport = CreateReceiveTransport();
+  });
 
   std::string graph_title = params_.analyzer.graph_title;
   if (graph_title.empty())
@@ -1273,7 +1272,7 @@
       is_quick_test_enabled, clock_, params_.logging.rtp_dump_name,
       task_queue());
 
-  SendTask(RTC_FROM_HERE, task_queue(), [&]() {
+  SendTask(task_queue(), [&]() {
     analyzer_->SetCall(sender_call_.get());
     analyzer_->SetReceiver(receiver_call_->Receiver());
     send_transport->SetReceiver(analyzer_.get());
@@ -1319,7 +1318,7 @@
 
   analyzer_->Wait();
 
-  SendTask(RTC_FROM_HERE, task_queue(), [&]() {
+  SendTask(task_queue(), [&]() {
     StopThumbnails();
     Stop();
 
@@ -1461,7 +1460,7 @@
     recv_event_log_ = std::make_unique<RtcEventLogNull>();
   }
 
-  SendTask(RTC_FROM_HERE, task_queue(), [&]() {
+  SendTask(task_queue(), [&]() {
     params_ = params;
     CheckParamsAndInjectionComponents();
 
@@ -1550,7 +1549,7 @@
 
   PressEnterToContinue(task_queue());
 
-  SendTask(RTC_FROM_HERE, task_queue(), [&]() {
+  SendTask(task_queue(), [&]() {
     Stop();
     DestroyStreams();
 
diff --git a/video/video_send_stream_impl_unittest.cc b/video/video_send_stream_impl_unittest.cc
index ac7ea21..2d334b1 100644
--- a/video/video_send_stream_impl_unittest.cc
+++ b/video/video_send_stream_impl_unittest.cc
@@ -195,14 +195,11 @@
             EXPECT_EQ(config.enforce_min_bitrate, !kSuspend);
             EXPECT_EQ(config.bitrate_priority, kDefaultBitratePriority);
           }));
-  test_queue_.SendTask(
-      [&] {
-        vss_impl->Start();
-        EXPECT_CALL(bitrate_allocator_, RemoveObserver(vss_impl.get()))
-            .Times(1);
-        vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+  test_queue_.SendTask([&] {
+    vss_impl->Start();
+    EXPECT_CALL(bitrate_allocator_, RemoveObserver(vss_impl.get())).Times(1);
+    vss_impl->Stop();
+  });
 }
 
 TEST_F(VideoSendStreamImplTest, UpdatesObserverOnConfigurationChange) {
@@ -267,8 +264,7 @@
                 VideoEncoderConfig::ContentType::kRealtimeVideo,
                 min_transmit_bitrate_bps);
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest, UpdatesObserverOnConfigurationChangeWithAlr) {
@@ -335,8 +331,7 @@
                 VideoEncoderConfig::ContentType::kScreen,
                 min_transmit_bitrate_bps);
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest,
@@ -398,8 +393,7 @@
                 VideoEncoderConfig::ContentType::kRealtimeVideo,
                 /*min_transmit_bitrate_bps=*/0);
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest, SetsScreensharePacingFactorWithFeedback) {
@@ -414,12 +408,10 @@
   auto vss_impl = CreateVideoSendStreamImpl(
       kDefaultInitialBitrateBps, kDefaultBitratePriority,
       VideoEncoderConfig::ContentType::kScreen);
-  test_queue_.SendTask(
-      [&] {
-        vss_impl->Start();
-        vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+  test_queue_.SendTask([&] {
+    vss_impl->Start();
+    vss_impl->Stop();
+  });
 }
 
 TEST_F(VideoSendStreamImplTest, DoesNotSetPacingFactorWithoutFeedback) {
@@ -427,13 +419,11 @@
   auto vss_impl = CreateVideoSendStreamImpl(
       kDefaultInitialBitrateBps, kDefaultBitratePriority,
       VideoEncoderConfig::ContentType::kScreen);
-  test_queue_.SendTask(
-      [&] {
-        EXPECT_CALL(transport_controller_, SetPacingFactor(_)).Times(0);
-        vss_impl->Start();
-        vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+  test_queue_.SendTask([&] {
+    EXPECT_CALL(transport_controller_, SetPacingFactor(_)).Times(0);
+    vss_impl->Start();
+    vss_impl->Stop();
+  });
 }
 
 TEST_F(VideoSendStreamImplTest, ForwardsVideoBitrateAllocationWhenEnabled) {
@@ -482,8 +472,7 @@
         sink->OnBitrateAllocationUpdated(alloc);
 
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest, ThrottlesVideoBitrateAllocationWhenTooSimilar) {
@@ -542,8 +531,7 @@
         sink->OnBitrateAllocationUpdated(updated_alloc);
 
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest, ForwardsVideoBitrateAllocationOnLayerChange) {
@@ -588,8 +576,7 @@
         sink->OnBitrateAllocationUpdated(updated_alloc);
 
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest, ForwardsVideoBitrateAllocationAfterTimeout) {
@@ -686,8 +673,7 @@
         }
 
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest, CallsVideoStreamEncoderOnBitrateUpdate) {
@@ -790,8 +776,7 @@
                     OnBitrateUpdated(DataRate::Zero(), DataRate::Zero(),
                                      DataRate::Zero(), 0, 0, 0));
         vss_impl->Stop();
-      },
-      RTC_FROM_HERE);
+      });
 }
 
 TEST_F(VideoSendStreamImplTest, DisablesPaddingOnPausedEncoder) {
@@ -863,8 +848,7 @@
             ->OnEncodedImage(encoded_image, &codec_specific);
         // Only after actual frame is encoded are we enabling the padding.
         EXPECT_GT(padding_bitrate, 0);
-      },
-      RTC_FROM_HERE);
+      });
 
   rtc::Event done;
   test_queue_.Get()->PostDelayedTask(
@@ -901,8 +885,7 @@
                 EncodedImageCallback::DropReason::kDroppedByEncoder);
         EXPECT_CALL(bitrate_allocator_, RemoveObserver(vss_impl.get()))
             .Times(0);
-      },
-      RTC_FROM_HERE);
+      });
 
   rtc::Event done;
   test_queue_.Get()->PostDelayedTask(
@@ -1025,8 +1008,7 @@
           ::testing::Mock::VerifyAndClearExpectations(&bitrate_allocator_);
 
           vss_impl->Stop();
-        },
-        RTC_FROM_HERE);
+        });
   }
 }
 }  // namespace internal
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index 541d40b..8bdad74 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -151,7 +151,7 @@
 };
 
 TEST_F(VideoSendStreamTest, CanStartStartedStream) {
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     CreateSenderCall();
 
     test::NullTransport transport;
@@ -165,7 +165,7 @@
 }
 
 TEST_F(VideoSendStreamTest, CanStopStoppedStream) {
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     CreateSenderCall();
 
     test::NullTransport transport;
@@ -1593,7 +1593,7 @@
     ~ChangingNetworkRouteTest() {
       // Block until all already posted tasks run to avoid 'use after free'
       // when such task accesses `this`.
-      SendTask(RTC_FROM_HERE, task_queue_, [] {});
+      SendTask(task_queue_, [] {});
     }
 
     void OnCallsCreated(Call* sender_call, Call* receiver_call) override {
@@ -1651,7 +1651,7 @@
       new_route.remote = rtc::RouteEndpoint::CreateWithNetworkId(20);
       BitrateConstraints bitrate_config;
 
-      SendTask(RTC_FROM_HERE, task_queue_,
+      SendTask(task_queue_,
                [this, &new_route, &bitrate_config]() {
                  RTC_DCHECK_RUN_ON(&task_queue_thread_);
                  call_->GetTransportControllerSend()->OnNetworkRouteChanged(
@@ -1665,7 +1665,7 @@
           << "Timed out while waiting for start bitrate to be exceeded.";
 
       SendTask(
-          RTC_FROM_HERE, task_queue_, [this, &new_route, &bitrate_config]() {
+          task_queue_, [this, &new_route, &bitrate_config]() {
             RTC_DCHECK_RUN_ON(&task_queue_thread_);
             bitrate_config.start_bitrate_bps = -1;
             bitrate_config.max_bitrate_bps = kNewMaxBitrateBps;
@@ -1719,7 +1719,7 @@
     ~RelayToDirectRouteTest() {
       // Block until all already posted tasks run to avoid 'use after free'
       // when such task accesses `this`.
-      SendTask(RTC_FROM_HERE, task_queue_, [] {});
+      SendTask(task_queue_, [] {});
     }
 
     void OnCallsCreated(Call* sender_call, Call* receiver_call) override {
@@ -1755,7 +1755,7 @@
       route.local = rtc::RouteEndpoint::CreateWithNetworkId(10);
       route.remote = rtc::RouteEndpoint::CreateWithNetworkId(20);
 
-      SendTask(RTC_FROM_HERE, task_queue_, [this, &route]() {
+      SendTask(task_queue_, [this, &route]() {
         RTC_DCHECK_RUN_ON(&task_queue_thread_);
         relayed_phase_ = true;
         route.remote = route.remote.CreateWithTurn(true);
@@ -1771,7 +1771,7 @@
       EXPECT_TRUE(Wait())
           << "Timeout waiting for sufficient packets sent count.";
 
-      SendTask(RTC_FROM_HERE, task_queue_, [this, &route]() {
+      SendTask(task_queue_, [this, &route]() {
         RTC_DCHECK_RUN_ON(&task_queue_thread_);
         EXPECT_LE(call_->GetStats().send_bandwidth_bps, kRelayBandwidthCapBps);
 
@@ -1829,7 +1829,7 @@
     }
 
     void PerformTest() override {
-      SendTask(RTC_FROM_HERE, task_queue_, [this]() {
+      SendTask(task_queue_, [this]() {
         transport_overhead_ = 100;
         call_->GetTransportControllerSend()->OnTransportOverheadChanged(
             transport_overhead_);
@@ -1842,7 +1842,7 @@
         packets_sent_ = 0;
       }
 
-      SendTask(RTC_FROM_HERE, task_queue_, [this]() {
+      SendTask(task_queue_, [this]() {
         transport_overhead_ = 500;
         call_->GetTransportControllerSend()->OnTransportOverheadChanged(
             transport_overhead_);
@@ -1890,7 +1890,7 @@
   ~MaxPaddingSetTest() {
     // Block until all already posted tasks run to avoid 'use after free'
     // when such task accesses `this`.
-    SendTask(RTC_FROM_HERE, task_queue_, [] {});
+    SendTask(task_queue_, [] {});
   }
 
   void ModifyVideoConfigs(
@@ -2071,7 +2071,7 @@
   EncoderObserver encoder;
   test::VideoEncoderProxyFactory encoder_factory(&encoder);
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this, &transport, &encoder_factory]() {
+  SendTask(task_queue(), [this, &transport, &encoder_factory]() {
     CreateSenderCall();
     CreateSendConfig(1, 0, 0, &transport);
     GetVideoSendConfig()->encoder_settings.encoder_factory = &encoder_factory;
@@ -2083,14 +2083,14 @@
 
   encoder.WaitForResolution(kDefaultWidth, kDefaultHeight);
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     frame_generator_capturer_->ChangeResolution(kDefaultWidth * 2,
                                                 kDefaultHeight * 2);
   });
 
   encoder.WaitForResolution(kDefaultWidth * 2, kDefaultHeight * 2);
 
-  SendTask(RTC_FROM_HERE, task_queue(), [this]() {
+  SendTask(task_queue(), [this]() {
     DestroyStreams();
     DestroyCalls();
   });
@@ -2325,7 +2325,7 @@
     void PerformTest() override {
       EXPECT_TRUE(Wait()) << "Timed out while waiting for Encode.";
 
-      SendTask(RTC_FROM_HERE, task_queue_, [this]() {
+      SendTask(task_queue_, [this]() {
         EXPECT_EQ(0u, num_releases());
         stream_->ReconfigureVideoEncoder(std::move(encoder_config_));
         EXPECT_EQ(0u, num_releases());
@@ -2418,7 +2418,7 @@
     // Change encoder settings to actually trigger reconfiguration.
     encoder_config_.frame_drop_enabled = !encoder_config_.frame_drop_enabled;
     encoder_config_.encoder_specific_settings = GetEncoderSpecificSettings();
-    SendTask(RTC_FROM_HERE, task_queue_, [&]() {
+    SendTask(task_queue_, [&]() {
       stream_->ReconfigureVideoEncoder(std::move(encoder_config_));
     });
     ASSERT_TRUE(
@@ -2835,14 +2835,14 @@
       BitrateConstraints bitrate_config;
       bitrate_config.start_bitrate_bps = kIncreasedStartBitrateKbps * 1000;
       bitrate_config.max_bitrate_bps = kIncreasedMaxBitrateKbps * 1000;
-      SendTask(RTC_FROM_HERE, task_queue_, [this, &bitrate_config]() {
+      SendTask(task_queue_, [this, &bitrate_config]() {
         call_->GetTransportControllerSend()->SetSdpBitrateParameters(
             bitrate_config);
       });
       // Encoder rate is capped by EncoderConfig max_bitrate_bps.
       WaitForSetRates(kMaxBitrateKbps);
       encoder_config_.max_bitrate_bps = kLowerMaxBitrateKbps * 1000;
-      SendTask(RTC_FROM_HERE, task_queue_, [&]() {
+      SendTask(task_queue_, [&]() {
         send_stream_->ReconfigureVideoEncoder(encoder_config_.Copy());
       });
       ASSERT_TRUE(create_rate_allocator_event_.Wait(
@@ -2854,7 +2854,7 @@
       EXPECT_EQ(1, num_encoder_initializations_);
 
       encoder_config_.max_bitrate_bps = kIncreasedMaxBitrateKbps * 1000;
-      SendTask(RTC_FROM_HERE, task_queue_, [&]() {
+      SendTask(task_queue_, [&]() {
         send_stream_->ReconfigureVideoEncoder(encoder_config_.Copy());
       });
       ASSERT_TRUE(create_rate_allocator_event_.Wait(
@@ -2951,8 +2951,7 @@
       EXPECT_TRUE(Wait())
           << "Timed out while waiting for the encoder to send one frame.";
       VideoSendStream::Stats stats;
-      SendTask(RTC_FROM_HERE, task_queue_,
-               [&]() { stats = send_stream_->GetStats(); });
+      SendTask(task_queue_, [&]() { stats = send_stream_->GetStats(); });
 
       for (size_t i = 0; i < kNumStreams; ++i) {
         ASSERT_TRUE(stats.substreams.find(kVideoSendSsrcs[i]) !=
@@ -3728,7 +3727,7 @@
       bitrate_config.start_bitrate_bps = kStartBitrateBps;
       bitrate_config.max_bitrate_bps = kMaxBitrateBps;
       bitrate_config.min_bitrate_bps = kMinBitrateBps;
-      SendTask(RTC_FROM_HERE, task_queue_, [this, &bitrate_config]() {
+      SendTask(task_queue_, [this, &bitrate_config]() {
         call_->GetTransportControllerSend()->SetSdpBitrateParameters(
             bitrate_config);
         call_->GetTransportControllerSend()->OnTransportOverheadChanged(40);
@@ -3985,7 +3984,7 @@
   auto reset_fun = [this](const VideoSendStream::Config& send_stream_config,
                           const VideoEncoderConfig& encoder_config,
                           test::BaseTest* test) {
-    SendTask(RTC_FROM_HERE, task_queue(),
+    SendTask(task_queue(),
              [this, &send_stream_config, &encoder_config, &test]() {
                Stop();
                DestroyVideoSendStreams();