Currently, such classes have public constructors, which leaks visibility.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0deb5531a31adbddf24918b8159c102bf20bd81d commit 0deb5531a31adbddf24918b8159c102bf20bd81d Author: Jordy Greenblatt <jordynass@chromium.org> Date: Mon Jan 29 01:21:40 2018 [CrOS Tether] Make constructors protected (instead of public) for classes with factories. At the moment we have classes with factory methods that have public constructors. Because the constructors only have to been visible to the factory and unittests, they should be protected. Bug: 775753 Change-Id: I410b5c40446b8957c4f08840069b12a870d8c93f Reviewed-on: https://chromium-review.googlesource.com/883612 Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Commit-Queue: Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#532299} [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/asynchronous_shutdown_object_container_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/asynchronous_shutdown_object_container_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/asynchronous_shutdown_object_container_impl_unittest.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/ble_advertiser_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/ble_advertiser_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/ble_advertiser_impl_unittest.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/ble_scanner_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/ble_scanner_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/ble_scanner_impl_unittest.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/connect_tethering_operation.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/connect_tethering_operation.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/crash_recovery_manager_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/crash_recovery_manager_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/crash_recovery_manager_impl_unittest.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/disconnect_tethering_operation.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/disconnect_tethering_operation.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/disconnect_tethering_request_sender_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/disconnect_tethering_request_sender_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/disconnect_tethering_request_sender_impl_unittest.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/error_tolerant_ble_advertisement_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/error_tolerant_ble_advertisement_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/error_tolerant_ble_advertisement_impl_unittest.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/host_scanner_operation.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/host_scanner_operation.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/keep_alive_operation.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/keep_alive_operation.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/synchronous_shutdown_object_container_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/synchronous_shutdown_object_container_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/tether_component_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/tether_component_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/tether_component_impl_unittest.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/tether_host_fetcher_impl.cc [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/tether_host_fetcher_impl.h [modify] https://crrev.com/0deb5531a31adbddf24918b8159c102bf20bd81d/chromeos/components/tether/tether_host_fetcher_impl_unittest.cc
Comment 1 by khorimoto@chromium.org
, Jan 4 2018Status: Available (was: Assigned)