Delete rtc::Location

Bug: webrtc:11318
Change-Id: I0b048a93c53fd40f398b82df4c1a500e0f05cb38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276280
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38196}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 665ee95..059aa5c 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -218,15 +218,6 @@
   absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
 }
 
-rtc_library("location") {
-  visibility = [ "*" ]
-  sources = [
-    "location.cc",
-    "location.h",
-  ]
-  deps = [ "system:rtc_export" ]
-}
-
 rtc_library("race_checker") {
   visibility = [ "*" ]
   sources = [
@@ -951,7 +942,6 @@
     ":criticalsection",
     ":event_tracer",
     ":ip_address",
-    ":location",
     ":logging",
     ":macromagic",
     ":network_constants",
@@ -1086,7 +1076,6 @@
     ":checks",
     ":copy_on_write_buffer",
     ":ip_address",
-    ":location",
     ":logging",
     ":macromagic",
     ":network_constants",
@@ -1385,7 +1374,6 @@
     ":byte_buffer",
     ":checks",
     ":ip_address",
-    ":location",
     ":logging",
     ":macromagic",
     ":rtc_base",
diff --git a/rtc_base/location.cc b/rtc_base/location.cc
deleted file mode 100644
index 0842549..0000000
--- a/rtc_base/location.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  Copyright 2016 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.
- */
-
-#include "rtc_base/location.h"
-
-#include <stdio.h>
-
-namespace rtc {
-
-std::string Location::ToString() const {
-  char buf[256];
-  snprintf(buf, sizeof(buf), "%s@%s:%d", function_name_, file_name_,
-           line_number_);
-  return buf;
-}
-
-}  // namespace rtc
diff --git a/rtc_base/location.h b/rtc_base/location.h
deleted file mode 100644
index c7335c2..0000000
--- a/rtc_base/location.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  Copyright 2016 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.
- */
-
-#ifndef RTC_BASE_LOCATION_H_
-#define RTC_BASE_LOCATION_H_
-
-#include <string>
-
-#include "rtc_base/system/rtc_export.h"
-
-namespace rtc {
-
-// Location provides basic info where of an object was constructed, or was
-// significantly brought to life.
-// This is a stripped down version of:
-// https://code.google.com/p/chromium/codesearch#chromium/src/base/location.h
-class RTC_EXPORT Location {
- public:
-  // Constructor should be called with a long-lived char*, such as __FILE__.
-  // It assumes the provided value will persist as a global constant, and it
-  // will not make a copy of it.
-  Location(const char* function_name, const char* file_name, int line_number)
-      : function_name_(function_name),
-        file_name_(file_name),
-        line_number_(line_number) {}
-  Location() = default;
-
-  const char* function_name() const { return function_name_; }
-  const char* file_name() const { return file_name_; }
-  int line_number() const { return line_number_; }
-  // TODO(steveanton): Remove once all downstream users have been updated to use
-  // `file_name()` and/or `line_number()`.
-  const char* file_and_line() const { return file_name_; }
-
-  std::string ToString() const;
-
- private:
-  const char* function_name_ = "Unknown";
-  const char* file_name_ = "Unknown";
-  int line_number_ = -1;
-};
-
-// Define a macro to record the current source location.
-#define RTC_FROM_HERE RTC_FROM_HERE_WITH_FUNCTION(__FUNCTION__)
-
-#define RTC_FROM_HERE_WITH_FUNCTION(function_name) \
-  ::rtc::Location(function_name, __FILE__, __LINE__)
-
-}  // namespace rtc
-
-#endif  // RTC_BASE_LOCATION_H_
diff --git a/rtc_base/thread.h b/rtc_base/thread.h
index 4b6a797..c571e36 100644
--- a/rtc_base/thread.h
+++ b/rtc_base/thread.h
@@ -35,7 +35,6 @@
 #include "api/units/time_delta.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/deprecated/recursive_critical_section.h"
-#include "rtc_base/location.h"
 #include "rtc_base/platform_thread_types.h"
 #include "rtc_base/socket_server.h"
 #include "rtc_base/synchronization/mutex.h"
@@ -324,13 +323,6 @@
     return result;
   }
 
-  // Deprecated, use `BlockingCall` instead.
-  template <typename ReturnT>
-  [[deprecated]] ReturnT Invoke(const Location& /*posted_from*/,
-                                FunctionView<ReturnT()> functor) {
-    return BlockingCall(functor);
-  }
-
   // Allows BlockingCall to specified `thread`. Thread never will be
   // dereferenced and will be used only for reference-based comparison, so
   // instance can be safely deleted. If NDEBUG is defined and RTC_DCHECK_IS_ON