components: default the user-defined empty ctor and dtor where possible
I need an owner's approval please for changes under: ['components/favicon', 'components/favicon_base', 'components/query_parser', 'components/sessions', 'components/visitedlink'] This is a mechanical change. There are a few instances (but not all) of empty user-defined constructors and destructors which can be defaulted in the /components code. This CL was uploaded by git cl split. R=sky@chromium.org Bug: 371316188 Change-Id: If2b363c364d8437b6a65434bacc49a73a033152f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5918669 Auto-Submit: Sorin Jianu <sorin@chromium.org> Commit-Queue: Sorin Jianu <sorin@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/main@{#1366386}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
8908fa0a96
commit
592d5754fa
components
favicon
core
favicon_base
query_parser
sessions
content
content_live_tab.cccontent_serialized_navigation_builder_unittest.ccextended_info_handler.hnavigation_task_id.ccnavigation_task_id_unittest.cc
core
command_storage_manager_delegate.hlive_tab.cclive_tab_context.hserialized_navigation_driver.hsession_id_generator.ccsession_types.cctab_restore_service_client.cctab_restore_service_observer.h
ios
visitedlink
@ -31,7 +31,7 @@ ContentLiveTab* ContentLiveTab::GetForWebContents(
|
||||
ContentLiveTab::ContentLiveTab(content::WebContents* contents)
|
||||
: web_contents_(contents) {}
|
||||
|
||||
ContentLiveTab::~ContentLiveTab() {}
|
||||
ContentLiveTab::~ContentLiveTab() = default;
|
||||
|
||||
bool ContentLiveTab::IsInitialBlankNavigation() {
|
||||
return navigation_controller().IsInitialBlankNavigation();
|
||||
|
@ -48,7 +48,7 @@ class TestExtendedInfoHandler : public ExtendedInfoHandler {
|
||||
TestExtendedInfoHandler(const TestExtendedInfoHandler&) = delete;
|
||||
TestExtendedInfoHandler& operator=(const TestExtendedInfoHandler&) = delete;
|
||||
|
||||
~TestExtendedInfoHandler() override {}
|
||||
~TestExtendedInfoHandler() override = default;
|
||||
|
||||
// ExtendedInfoHandler:
|
||||
std::string GetExtendedInfo(content::NavigationEntry* entry) const override {
|
||||
@ -111,14 +111,14 @@ void SetExtendedInfoForTest(content::NavigationEntry* entry) {
|
||||
|
||||
class ContentSerializedNavigationBuilderTest : public testing::Test {
|
||||
public:
|
||||
ContentSerializedNavigationBuilderTest() {}
|
||||
ContentSerializedNavigationBuilderTest() = default;
|
||||
|
||||
ContentSerializedNavigationBuilderTest(
|
||||
const ContentSerializedNavigationBuilderTest&) = delete;
|
||||
ContentSerializedNavigationBuilderTest& operator=(
|
||||
const ContentSerializedNavigationBuilderTest&) = delete;
|
||||
|
||||
~ContentSerializedNavigationBuilderTest() override {}
|
||||
~ContentSerializedNavigationBuilderTest() override = default;
|
||||
|
||||
void SetUp() override {
|
||||
ContentSerializedNavigationDriver* driver =
|
||||
|
@ -22,8 +22,8 @@ namespace sessions {
|
||||
// Chrome.
|
||||
class SESSIONS_EXPORT ExtendedInfoHandler {
|
||||
public:
|
||||
ExtendedInfoHandler() {}
|
||||
virtual ~ExtendedInfoHandler() {}
|
||||
ExtendedInfoHandler() = default;
|
||||
virtual ~ExtendedInfoHandler() = default;
|
||||
|
||||
// Returns the data to write to disk for the specified NavigationEntry.
|
||||
virtual std::string GetExtendedInfo(
|
||||
|
@ -11,12 +11,12 @@
|
||||
namespace sessions {
|
||||
const char kTaskIdKey[] = "task_id_data";
|
||||
|
||||
NavigationTaskId::NavigationTaskId() {}
|
||||
NavigationTaskId::NavigationTaskId() = default;
|
||||
|
||||
NavigationTaskId::NavigationTaskId(const NavigationTaskId& navigation_task_id) =
|
||||
default;
|
||||
|
||||
NavigationTaskId::~NavigationTaskId() {}
|
||||
NavigationTaskId::~NavigationTaskId() = default;
|
||||
|
||||
NavigationTaskId* NavigationTaskId::Get(content::NavigationEntry* entry) {
|
||||
NavigationTaskId* navigation_task_id =
|
||||
|
@ -12,12 +12,12 @@ namespace sessions {
|
||||
|
||||
class NavigationTaskIDTest : public testing::Test {
|
||||
public:
|
||||
NavigationTaskIDTest() {}
|
||||
NavigationTaskIDTest() = default;
|
||||
|
||||
NavigationTaskIDTest(const NavigationTaskIDTest&) = delete;
|
||||
NavigationTaskIDTest& operator=(const NavigationTaskIDTest&) = delete;
|
||||
|
||||
~NavigationTaskIDTest() override {}
|
||||
~NavigationTaskIDTest() override = default;
|
||||
|
||||
void SetUp() override {
|
||||
navigation_entry_ = content::NavigationEntry::Create();
|
||||
|
@ -15,7 +15,7 @@ namespace sessions {
|
||||
// chrome/content dependencies.
|
||||
class CommandStorageManagerDelegate {
|
||||
public:
|
||||
CommandStorageManagerDelegate() {}
|
||||
CommandStorageManagerDelegate() = default;
|
||||
|
||||
// Returns true if save operations can be performed as a delayed task - which
|
||||
// is usually only used by unit tests.
|
||||
@ -34,7 +34,7 @@ class CommandStorageManagerDelegate {
|
||||
virtual void OnErrorWritingSessionCommands() = 0;
|
||||
|
||||
protected:
|
||||
virtual ~CommandStorageManagerDelegate() {}
|
||||
virtual ~CommandStorageManagerDelegate() = default;
|
||||
};
|
||||
|
||||
} // namespace sessions
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
namespace sessions {
|
||||
|
||||
LiveTab::~LiveTab() {}
|
||||
LiveTab::~LiveTab() = default;
|
||||
|
||||
std::unique_ptr<tab_restore::PlatformSpecificTabData>
|
||||
LiveTab::GetPlatformSpecificTabData() {
|
||||
|
@ -87,7 +87,7 @@ class SESSIONS_EXPORT LiveTabContext {
|
||||
virtual void CloseTab() = 0;
|
||||
|
||||
protected:
|
||||
virtual ~LiveTabContext() {}
|
||||
virtual ~LiveTabContext() = default;
|
||||
};
|
||||
|
||||
} // namespace sessions
|
||||
|
@ -38,7 +38,7 @@ class SESSIONS_EXPORT SerializedNavigationDriver {
|
||||
const std::string& page_state) const = 0;
|
||||
|
||||
protected:
|
||||
virtual ~SerializedNavigationDriver() {}
|
||||
virtual ~SerializedNavigationDriver() = default;
|
||||
};
|
||||
|
||||
} // namespace sessions
|
||||
|
@ -96,7 +96,7 @@ SessionIdGenerator::SessionIdGenerator()
|
||||
last_value_(0),
|
||||
rand_generator_(base::BindRepeating(&DefaultRandGenerator)) {}
|
||||
|
||||
SessionIdGenerator::~SessionIdGenerator() {}
|
||||
SessionIdGenerator::~SessionIdGenerator() = default;
|
||||
|
||||
void SessionIdGenerator::IncrementValueBy(int increment) {
|
||||
DCHECK_LT(0, increment);
|
||||
|
@ -28,7 +28,7 @@ SessionTab::~SessionTab() {
|
||||
|
||||
SessionTabGroup::SessionTabGroup(const tab_groups::TabGroupId& id) : id(id) {}
|
||||
|
||||
SessionTabGroup::~SessionTabGroup() {}
|
||||
SessionTabGroup::~SessionTabGroup() = default;
|
||||
|
||||
// SessionWindow ---------------------------------------------------------------
|
||||
|
||||
@ -40,6 +40,6 @@ SessionWindow::SessionWindow()
|
||||
is_constrained(true),
|
||||
show_state(ui::mojom::WindowShowState::kDefault) {}
|
||||
|
||||
SessionWindow::~SessionWindow() {}
|
||||
SessionWindow::~SessionWindow() = default;
|
||||
|
||||
} // namespace sessions
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
namespace sessions {
|
||||
|
||||
TabRestoreServiceClient::~TabRestoreServiceClient() {}
|
||||
TabRestoreServiceClient::~TabRestoreServiceClient() = default;
|
||||
|
||||
void TabRestoreServiceClient::OnTabRestored(const GURL& url) {}
|
||||
|
||||
|
@ -26,7 +26,7 @@ class SESSIONS_EXPORT TabRestoreServiceObserver {
|
||||
virtual void TabRestoreServiceLoaded(TabRestoreService* service) {}
|
||||
|
||||
protected:
|
||||
virtual ~TabRestoreServiceObserver() {}
|
||||
virtual ~TabRestoreServiceObserver() = default;
|
||||
};
|
||||
|
||||
} // namespace sessions
|
||||
|
@ -7,6 +7,6 @@
|
||||
|
||||
namespace sessions {
|
||||
|
||||
IOSLiveTab::~IOSLiveTab() {}
|
||||
IOSLiveTab::~IOSLiveTab() = default;
|
||||
|
||||
} // namespace sessions
|
||||
|
@ -11,7 +11,7 @@ namespace sessions {
|
||||
RestoreIOSLiveTab::RestoreIOSLiveTab(web::proto::NavigationStorage storage)
|
||||
: storage_(std::move(storage)) {}
|
||||
|
||||
RestoreIOSLiveTab::~RestoreIOSLiveTab() {}
|
||||
RestoreIOSLiveTab::~RestoreIOSLiveTab() = default;
|
||||
|
||||
bool RestoreIOSLiveTab::IsInitialBlankNavigation() {
|
||||
return false;
|
||||
|
@ -28,7 +28,7 @@ IOSWebStateLiveTab* IOSWebStateLiveTab::GetForWebState(
|
||||
IOSWebStateLiveTab::IOSWebStateLiveTab(web::WebState* web_state)
|
||||
: web_state_(web_state) {}
|
||||
|
||||
IOSWebStateLiveTab::~IOSWebStateLiveTab() {}
|
||||
IOSWebStateLiveTab::~IOSWebStateLiveTab() = default;
|
||||
|
||||
bool IOSWebStateLiveTab::IsInitialBlankNavigation() {
|
||||
return navigation_manager()->GetItemCount() == 0;
|
||||
|
Reference in New Issue
Block a user