diff options
author | Ryan Keane <rwkeane@google.com> | 2020-05-08 09:41:21 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-08 21:14:00 +0000 |
commit | c24178863301cd9b2295a5a0e8dd94715dbe7f7a (patch) | |
tree | e572a65f4f9808238dc8f0696b1b0c7ef00911bf | |
parent | 6b6ba5ba2c60f7b930e6645e340f37b511f7edc3 (diff) | |
download | openscreen-c24178863301cd9b2295a5a0e8dd94715dbe7f7a.tar.gz |
Move SerialDeletePtr to platform/api
util/ isn't exposed to clients, so this file should be moved to
platform/api which is.
NOTE: platform/base cannot be used because platform/base cannot depend
on platform/api.
Bug: b/155511578
Change-Id: Ib27bf33809c431b844e4443601813758c81d75e7
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2189915
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Commit-Queue: Ryan Keane <rwkeane@google.com>
-rw-r--r-- | cast/sender/public/sender_socket_factory.h | 2 | ||||
-rw-r--r-- | cast/standalone_receiver/cast_agent.h | 2 | ||||
-rw-r--r-- | cast/test/cast_socket_e2e_test.cc | 2 | ||||
-rw-r--r-- | discovery/dnssd/impl/service_dispatcher.cc | 1 | ||||
-rw-r--r-- | discovery/dnssd/public/dns_sd_service.h | 1 | ||||
-rw-r--r-- | discovery/public/dns_sd_service_factory.h | 2 | ||||
-rw-r--r-- | platform/BUILD.gn | 14 | ||||
-rw-r--r-- | platform/api/serial_delete_ptr.h (renamed from util/serial_delete_ptr.h) | 6 | ||||
-rw-r--r-- | platform/api/serial_delete_ptr_unittest.cc (renamed from util/serial_delete_ptr_unittest.cc) | 2 | ||||
-rw-r--r-- | util/BUILD.gn | 6 |
10 files changed, 15 insertions, 23 deletions
diff --git a/cast/sender/public/sender_socket_factory.h b/cast/sender/public/sender_socket_factory.h index 67d8c901..f0247a28 100644 --- a/cast/sender/public/sender_socket_factory.h +++ b/cast/sender/public/sender_socket_factory.h @@ -12,10 +12,10 @@ #include <vector> #include "cast/common/public/cast_socket.h" +#include "platform/api/serial_delete_ptr.h" #include "platform/api/task_runner.h" #include "platform/api/tls_connection_factory.h" #include "platform/base/ip_address.h" -#include "util/serial_delete_ptr.h" namespace openscreen { namespace cast { diff --git a/cast/standalone_receiver/cast_agent.h b/cast/standalone_receiver/cast_agent.h index 74b2f892..d9932b9d 100644 --- a/cast/standalone_receiver/cast_agent.h +++ b/cast/standalone_receiver/cast_agent.h @@ -16,10 +16,10 @@ #include "cast/streaming/environment.h" #include "cast/streaming/receiver_session.h" #include "platform/api/scoped_wake_lock.h" +#include "platform/api/serial_delete_ptr.h" #include "platform/base/error.h" #include "platform/base/interface_info.h" #include "platform/impl/task_runner.h" -#include "util/serial_delete_ptr.h" namespace openscreen { namespace cast { diff --git a/cast/test/cast_socket_e2e_test.cc b/cast/test/cast_socket_e2e_test.cc index 522a0209..edffe0bd 100644 --- a/cast/test/cast_socket_e2e_test.cc +++ b/cast/test/cast_socket_e2e_test.cc @@ -20,6 +20,7 @@ #include "cast/receiver/public/receiver_socket_factory.h" #include "cast/sender/public/sender_socket_factory.h" #include "gtest/gtest.h" +#include "platform/api/serial_delete_ptr.h" #include "platform/api/tls_connection_factory.h" #include "platform/base/tls_connect_options.h" #include "platform/base/tls_credentials.h" @@ -29,7 +30,6 @@ #include "platform/impl/platform_client_posix.h" #include "util/crypto/certificate_utils.h" #include "util/osp_logging.h" -#include "util/serial_delete_ptr.h" namespace openscreen { namespace cast { diff --git a/discovery/dnssd/impl/service_dispatcher.cc b/discovery/dnssd/impl/service_dispatcher.cc index 794511a8..ce350ca6 100644 --- a/discovery/dnssd/impl/service_dispatcher.cc +++ b/discovery/dnssd/impl/service_dispatcher.cc @@ -10,6 +10,7 @@ #include "discovery/dnssd/impl/service_instance.h" #include "discovery/dnssd/public/dns_sd_instance.h" #include "discovery/mdns/public/mdns_service.h" +#include "platform/api/serial_delete_ptr.h" #include "platform/api/task_runner.h" #include "util/trace_logging.h" diff --git a/discovery/dnssd/public/dns_sd_service.h b/discovery/dnssd/public/dns_sd_service.h index f0fe130b..c5e84384 100644 --- a/discovery/dnssd/public/dns_sd_service.h +++ b/discovery/dnssd/public/dns_sd_service.h @@ -11,7 +11,6 @@ #include "platform/base/error.h" #include "platform/base/interface_info.h" #include "platform/base/ip_address.h" -#include "util/serial_delete_ptr.h" namespace openscreen { diff --git a/discovery/public/dns_sd_service_factory.h b/discovery/public/dns_sd_service_factory.h index e2dcb836..3e973541 100644 --- a/discovery/public/dns_sd_service_factory.h +++ b/discovery/public/dns_sd_service_factory.h @@ -6,7 +6,7 @@ #define DISCOVERY_PUBLIC_DNS_SD_SERVICE_FACTORY_H_ #include "discovery/dnssd/public/dns_sd_service.h" -#include "util/serial_delete_ptr.h" +#include "platform/api/serial_delete_ptr.h" namespace openscreen { diff --git a/platform/BUILD.gn b/platform/BUILD.gn index 296f71f8..375ba41a 100644 --- a/platform/BUILD.gn +++ b/platform/BUILD.gn @@ -44,6 +44,7 @@ source_set("api") { "api/network_interface.h", "api/scoped_wake_lock.cc", "api/scoped_wake_lock.h", + "api/serial_delete_ptr.h", "api/task_runner.h", "api/time.h", "api/tls_connection.cc", @@ -56,9 +57,7 @@ source_set("api") { "api/udp_socket.h", ] - public_deps = [ - ":base", - ] + public_deps = [ ":base" ] } # The following target is only activated in standalone builds (see :platform). @@ -150,13 +149,9 @@ if (!build_with_chromium) { # The main target, which either assumes an embedder will link-in the platform # API implementation elsewhere, or links-in the :standalone_impl in the build. source_set("platform") { - public_deps = [ - ":api", - ] + public_deps = [ ":api" ] if (!build_with_chromium) { - deps = [ - ":standalone_impl", - ] + deps = [ ":standalone_impl" ] } } @@ -202,6 +197,7 @@ source_set("unittests") { testonly = true sources = [ + "api/serial_delete_ptr_unittest.cc", "api/time_unittest.cc", "base/error_unittest.cc", "base/ip_address_unittest.cc", diff --git a/util/serial_delete_ptr.h b/platform/api/serial_delete_ptr.h index 1aff2495..a3bdf412 100644 --- a/util/serial_delete_ptr.h +++ b/platform/api/serial_delete_ptr.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UTIL_SERIAL_DELETE_PTR_H_ -#define UTIL_SERIAL_DELETE_PTR_H_ +#ifndef PLATFORM_API_SERIAL_DELETE_PTR_H_ +#define PLATFORM_API_SERIAL_DELETE_PTR_H_ #include <cassert> #include <memory> @@ -110,4 +110,4 @@ SerialDeletePtr<Type> MakeSerialDelete(TaskRunner* task_runner, } // namespace openscreen -#endif // UTIL_SERIAL_DELETE_PTR_H_ +#endif // PLATFORM_API_SERIAL_DELETE_PTR_H_ diff --git a/util/serial_delete_ptr_unittest.cc b/platform/api/serial_delete_ptr_unittest.cc index c8b899c5..5a37ad33 100644 --- a/util/serial_delete_ptr_unittest.cc +++ b/platform/api/serial_delete_ptr_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "util/serial_delete_ptr.h" +#include "platform/api/serial_delete_ptr.h" #include "gtest/gtest.h" #include "platform/test/fake_clock.h" diff --git a/util/BUILD.gn b/util/BUILD.gn index 991b5188..b2100346 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -45,7 +45,6 @@ source_set("util") { "operation_loop.h", "osp_logging.h", "saturate_cast.h", - "serial_delete_ptr.h", "simple_fraction.cc", "simple_fraction.h", "std_util.h", @@ -62,9 +61,7 @@ source_set("util") { "yet_another_bit_vector.h", ] - public_deps = [ - "../third_party/jsoncpp", - ] + public_deps = [ "../third_party/jsoncpp" ] deps = [ "../third_party/abseil", @@ -93,7 +90,6 @@ source_set("unittests") { "json/json_value_unittest.cc", "operation_loop_unittest.cc", "saturate_cast_unittest.cc", - "serial_delete_ptr_unittest.cc", "simple_fraction_unittest.cc", "stringprintf_unittest.cc", "trace_logging/scoped_trace_operations_unittest.cc", |