Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Issue 804533005: Standardize usage of virtual/override/final specifiers in base/. (Closed)

Created:
6 years ago by dcheng
Modified:
6 years ago
Reviewers:
Nico
CC:
asvitkine+watch_chromium.org, chromium-reviews, dsinclair+watch_chromium.org, erikwright+watch_chromium.org, gavinp+memory_chromium.org, sadrul, tfarina, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Standardize usage of virtual/override/final specifiers in base/. The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. Several formatting edits by clang-format were manually reverted, due to mangling of some of the more complicate IPC macros. BUG=417463 Committed: https://crrev.com/8aef3761e6ff2a3315d23810187e5f52462db30f Cr-Commit-Position: refs/heads/master@{#309527}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Simplify #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -116 lines) Patch
M base/callback_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/debug/crash_logging_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/debug/trace_event_memory_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/debug/trace_event_synthetic_delay_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M base/debug/trace_event_system_stats_monitor_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/debug/trace_event_unittest.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M base/files/file_path_unittest.cc View 1 1 chunk +1 line, -9 lines 0 comments Download
M base/files/file_path_watcher_browsertest.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M base/files/file_proxy_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/files/file_util_proxy_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/files/file_util_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M base/files/important_file_writer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/files/memory_mapped_file_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/json/json_value_serializer_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M base/memory/discardable_memory_manager_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M base/memory/discardable_memory_shmem.h View 2 chunks +8 lines, -8 lines 0 comments Download
M base/memory/discardable_memory_shmem_allocator.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/memory/singleton_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/message_loop/message_loop_proxy_impl_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/message_loop/message_loop_proxy_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M base/message_loop/message_pump_glib_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/message_loop/message_pump_libevent_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M base/metrics/histogram_base_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M base/metrics/histogram_snapshot_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/metrics/histogram_unittest.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M base/metrics/sparse_histogram_unittest.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M base/metrics/statistics_recorder_unittest.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M base/power_monitor/power_monitor_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/prefs/json_pref_store_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M base/prefs/overlay_user_pref_store_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/prefs/pref_change_registrar_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/prefs/pref_notifier_impl_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/prefs/pref_value_store_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/prefs/scoped_user_pref_update_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/process/memory_unittest.cc View 2 chunks +3 lines, -7 lines 0 comments Download
M base/sequence_checker_unittest.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M base/system_monitor/system_monitor_unittest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M base/task/cancelable_task_tracker_unittest.cc View 1 2 chunks +1 line, -3 lines 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 1 chunk +1 line, -7 lines 0 comments Download
M base/threading/watchdog_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M base/threading/worker_pool_posix_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/time/pr_time_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/time/time_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/tracked_objects_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
dcheng
Hoping to enable the strict version of these checks on at least several platforms while ...
6 years ago (2014-12-22 21:38:23 UTC) #2
Nico
lgtm, but what's with all those empty overrides? Can we remove them? Or am I ...
6 years ago (2014-12-22 22:05:42 UTC) #3
dcheng
https://codereview.chromium.org/804533005/diff/1/base/sequence_checker_unittest.cc File base/sequence_checker_unittest.cc (right): https://codereview.chromium.org/804533005/diff/1/base/sequence_checker_unittest.cc#newcode59 base/sequence_checker_unittest.cc:59: ~SequenceCheckerTest() override {} On 2014/12/22 at 22:05:42, Nico wrote: ...
6 years ago (2014-12-22 22:41:26 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/804533005/20001
6 years ago (2014-12-23 01:22:21 UTC) #6
commit-bot: I haz the power
Committed patchset #2 (id:20001)
6 years ago (2014-12-23 02:57:14 UTC) #7
commit-bot: I haz the power
6 years ago (2014-12-23 02:58:00 UTC) #8
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/8aef3761e6ff2a3315d23810187e5f52462db30f
Cr-Commit-Position: refs/heads/master@{#309527}

Powered by Google App Engine
This is Rietveld 408576698