Delete GlobalTaskQueueFactory as now unused

Bug: webrtc:10284
Change-Id: I80fd75b0bd306a26e0c022047551587ee5fd08cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144781
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28516}
This commit is contained in:
Danil Chapovalov 2019-07-08 09:28:10 +02:00 committed by Commit Bot
parent 6456e352ac
commit b249c54209
6 changed files with 0 additions and 92 deletions

View File

@ -480,7 +480,6 @@ if (rtc_include_tests) {
"api:rtc_api_unittests",
"api/audio/test:audio_api_unittests",
"api/audio_codecs/test:audio_codecs_api_unittests",
"api/task_queue:global_task_queue_factory",
"api/video/test:rtc_api_video_unittests",
"api/video_codecs/test:video_codecs_api_unittests",
"call:fake_network_pipe_unittests",

View File

@ -84,25 +84,3 @@ if (rtc_include_tests) {
]
}
}
rtc_source_set("global_task_queue_factory") {
# TODO(bugs.webrtc.org/10284): Remove this target when task queue factory
# propagated to all components that create TaskQueues.
visibility = [ "*" ]
sources = [
"global_task_queue_factory.cc",
"global_task_queue_factory.h",
]
deps = [
":task_queue",
"../../rtc_base:checks",
]
if (build_with_chromium) {
# Chromium uses link-time injection of the CreateDefaultTaskQueueFactory
deps += [ "../../../webrtc_overrides:task_queue_impl" ]
sources += [ "default_task_queue_factory.h" ]
} else {
deps += [ ":default_task_queue_factory" ]
}
}

View File

@ -1,40 +0,0 @@
/*
* Copyright 2019 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 "api/task_queue/global_task_queue_factory.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "rtc_base/checks.h"
namespace webrtc {
namespace {
TaskQueueFactory* GlobalOrDefault(TaskQueueFactory* global) {
static TaskQueueFactory* const factory =
global ? global : CreateDefaultTaskQueueFactory().release();
return factory;
}
} // namespace
void SetGlobalTaskQueueFactory(std::unique_ptr<TaskQueueFactory> factory) {
RTC_CHECK(factory) << "Can't set nullptr TaskQueueFactory";
// Own, but never delete the global factory.
TaskQueueFactory* global = factory.release();
RTC_CHECK(GlobalOrDefault(global) == global)
<< "Task queue factory set after another SetFactory or after a task "
"queue was created";
}
TaskQueueFactory& GlobalTaskQueueFactory() {
return *GlobalOrDefault(nullptr);
}
} // namespace webrtc

View File

@ -1,27 +0,0 @@
/*
* Copyright 2019 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 API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_
#define API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_
#include <memory>
#include "api/task_queue/task_queue_factory.h"
namespace webrtc {
// May be called at most once, and before any TaskQueue is created.
void SetGlobalTaskQueueFactory(std::unique_ptr<TaskQueueFactory> factory);
// Returns TaskQueue factory. Always returns the same factory.
TaskQueueFactory& GlobalTaskQueueFactory();
} // namespace webrtc
#endif // API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_

View File

@ -153,7 +153,6 @@ rtc_static_library("video_coding") {
"..:module_api_public",
"../../api:fec_controller_api",
"../../api:rtp_headers",
"../../api/task_queue:global_task_queue_factory",
"../../api/units:data_rate",
"../../api/video:builtin_video_bitrate_allocator_factory",
"../../api/video:encoded_frame",

View File

@ -232,7 +232,6 @@ if (is_ios || is_mac) {
deps = [
":audio_device",
"../api/task_queue:global_task_queue_factory",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:audio_device_generic",
"../rtc_base:checks",