update_engine: Add override when possible.

Google Style Guide requires to include the "override" keyword
when overriding a method on a derived class, so the compiler will
catch errors if the method is not overriding a member of the base
class.

This patch introduces the "override" keyword when possible.

BUG=None
TEST=FEATURES=test emerge-link update_engine

Change-Id: Ie83d115c5730f3b35b3d95859a54bc1a48e0be7b
Reviewed-on: https://chromium-review.googlesource.com/228928
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/action.h b/action.h
index 63ab417..53786d1 100644
--- a/action.h
+++ b/action.h
@@ -132,7 +132,7 @@
 template<typename SubClass>
 class Action : public AbstractAction {
  public:
-  virtual ~Action() {}
+  ~Action() override {}
 
   // Attaches an input pipe to this Action. This is optional; an Action
   // doesn't need to have an input pipe. The input pipe must be of the type
diff --git a/bzip_extent_writer_unittest.cc b/bzip_extent_writer_unittest.cc
index 0aa8709..4cf971b 100644
--- a/bzip_extent_writer_unittest.cc
+++ b/bzip_extent_writer_unittest.cc
@@ -27,12 +27,12 @@
 
 class BzipExtentWriterTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     memcpy(path_, kPathTemplate, sizeof(kPathTemplate));
     fd_ = mkstemp(path_);
     ASSERT_GE(fd_, 0);
   }
-  virtual void TearDown() {
+  void TearDown() override {
     close(fd_);
     unlink(path_);
   }
diff --git a/certificate_checker_unittest.cc b/certificate_checker_unittest.cc
index d75b543..a3d7465 100644
--- a/certificate_checker_unittest.cc
+++ b/certificate_checker_unittest.cc
@@ -31,7 +31,7 @@
   CertificateCheckerTest() {}
 
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     depth_ = 0;
     length_ = 4;
     digest_[0] = 0x17;
@@ -53,7 +53,7 @@
     prefs_ = fake_system_state_.mock_prefs();
   }
 
-  virtual void TearDown() {}
+  void TearDown() override {}
 
   FakeSystemState fake_system_state_;
   MockPrefs* prefs_;  // shortcut to fake_system_state_.mock_prefs()
diff --git a/chrome_browser_proxy_resolver.h b/chrome_browser_proxy_resolver.h
index 80b1b2a..8b47672 100644
--- a/chrome_browser_proxy_resolver.h
+++ b/chrome_browser_proxy_resolver.h
@@ -30,12 +30,12 @@
 class ChromeBrowserProxyResolver : public ProxyResolver {
  public:
   explicit ChromeBrowserProxyResolver(DBusWrapperInterface* dbus);
-  virtual ~ChromeBrowserProxyResolver();
+  ~ChromeBrowserProxyResolver() override;
   bool Init();
 
-  virtual bool GetProxiesForUrl(const std::string& url,
-                                ProxiesResolvedFn callback,
-                                void* data);
+  bool GetProxiesForUrl(const std::string& url,
+                        ProxiesResolvedFn callback,
+                        void* data) override;
   void set_timeout(int seconds) { timeout_ = seconds; }
 
   // Public for test
diff --git a/clock.h b/clock.h
index f61fe00..d53ad34 100644
--- a/clock.h
+++ b/clock.h
@@ -14,11 +14,11 @@
  public:
   Clock() {}
 
-  virtual base::Time GetWallclockTime();
+  base::Time GetWallclockTime() override;
 
-  virtual base::Time GetMonotonicTime();
+  base::Time GetMonotonicTime() override;
 
-  virtual base::Time GetBootTime();
+  base::Time GetBootTime() override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(Clock);
diff --git a/clock_interface.h b/clock_interface.h
index bafb7fc..8ff122c 100644
--- a/clock_interface.h
+++ b/clock_interface.h
@@ -17,6 +17,8 @@
 // is also unit testing.
 class ClockInterface {
  public:
+  virtual ~ClockInterface() = default;
+
   // Gets the current time e.g. similar to base::Time::Now().
   virtual base::Time GetWallclockTime() = 0;
 
@@ -33,8 +35,6 @@
   //
   // (This is a simple wrapper around clock_gettime(2) / CLOCK_BOOTTIME.)
   virtual base::Time GetBootTime() = 0;
-
-  virtual ~ClockInterface() {}
 };
 
 }  // namespace chromeos_update_engine
diff --git a/delta_performer.h b/delta_performer.h
index c663208..256495f 100644
--- a/delta_performer.h
+++ b/delta_performer.h
@@ -85,22 +85,22 @@
 
   // flags and mode ignored. Once Close()d, a DeltaPerformer can't be
   // Open()ed again.
-  int Open(const char* path, int flags, mode_t mode);
+  int Open(const char* path, int flags, mode_t mode) override;
 
   // FileWriter's Write implementation where caller doesn't care about
   // error codes.
-  bool Write(const void* bytes, size_t count) {
+  bool Write(const void* bytes, size_t count) override {
     ErrorCode error;
     return Write(bytes, count, &error);
   }
 
   // FileWriter's Write implementation that returns a more specific |error| code
   // in case of failures in Write operation.
-  bool Write(const void* bytes, size_t count, ErrorCode *error);
+  bool Write(const void* bytes, size_t count, ErrorCode *error) override;
 
   // Wrapper around close. Returns 0 on success or -errno on error.
   // Closes both 'path' given to Open() and the kernel path.
-  int Close();
+  int Close() override;
 
   // Returns |true| only if the manifest has been processed and it's valid.
   bool IsManifestValid();
diff --git a/download_action.h b/download_action.h
index 6f16e20..3cf7e6a 100644
--- a/download_action.h
+++ b/download_action.h
@@ -53,9 +53,9 @@
   DownloadAction(PrefsInterface* prefs,
                  SystemState* system_state,
                  HttpFetcher* http_fetcher);
-  virtual ~DownloadAction();
-  void PerformAction();
-  void TerminateProcessing();
+  ~DownloadAction() override;
+  void PerformAction() override;
+  void TerminateProcessing() override;
 
   // Testing
   void SetTestFileWriter(FileWriter* writer) {
@@ -66,14 +66,14 @@
 
   // Debugging/logging
   static std::string StaticType() { return "DownloadAction"; }
-  std::string Type() const { return StaticType(); }
+  std::string Type() const override { return StaticType(); }
 
   // HttpFetcherDelegate methods (see http_fetcher.h)
-  virtual void ReceivedBytes(HttpFetcher *fetcher,
-                             const char* bytes, int length);
-  virtual void SeekToOffset(off_t offset);
-  virtual void TransferComplete(HttpFetcher *fetcher, bool successful);
-  virtual void TransferTerminated(HttpFetcher *fetcher);
+  void ReceivedBytes(HttpFetcher *fetcher,
+                     const char* bytes, int length) override;
+  void SeekToOffset(off_t offset) override;
+  void TransferComplete(HttpFetcher *fetcher, bool successful) override;
+  void TransferTerminated(HttpFetcher *fetcher) override;
 
   DownloadActionDelegate* delegate() const { return delegate_; }
   void set_delegate(DownloadActionDelegate* delegate) {
diff --git a/download_action_unittest.cc b/download_action_unittest.cc
index e7c8f02..5825286 100644
--- a/download_action_unittest.cc
+++ b/download_action_unittest.cc
@@ -56,7 +56,7 @@
       : loop_(nullptr),
         processing_done_called_(false),
         expected_code_(expected_code) {}
-  virtual ~DownloadActionTestProcessorDelegate() {
+  ~DownloadActionTestProcessorDelegate() override {
     EXPECT_TRUE(processing_done_called_);
   }
   virtual void ProcessingDone(const ActionProcessor* processor,
@@ -449,15 +449,15 @@
       start_at_offset_(0),
       fake_um_(fake_system_state_.fake_clock()) {}
 
-  virtual ~P2PDownloadActionTest() {}
+  ~P2PDownloadActionTest() override {}
 
   // Derived from testing::Test.
-  virtual void SetUp() {
+  void SetUp() override {
     loop_ = g_main_loop_new(g_main_context_default(), FALSE);
   }
 
   // Derived from testing::Test.
-  virtual void TearDown() {
+  void TearDown() override {
     if (loop_ != nullptr)
       g_main_loop_unref(loop_);
   }
diff --git a/extent_writer_unittest.cc b/extent_writer_unittest.cc
index c3118fd..32730b0 100644
--- a/extent_writer_unittest.cc
+++ b/extent_writer_unittest.cc
@@ -34,12 +34,12 @@
 
 class ExtentWriterTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     memcpy(path_, kPathTemplate, sizeof(kPathTemplate));
     fd_ = mkstemp(path_);
     ASSERT_GE(fd_, 0);
   }
-  virtual void TearDown() {
+  void TearDown() override {
     close(fd_);
     unlink(path_);
   }
diff --git a/fake_clock.h b/fake_clock.h
index 54c7c02..c717bdf 100644
--- a/fake_clock.h
+++ b/fake_clock.h
@@ -14,15 +14,15 @@
  public:
   FakeClock() {}
 
-  virtual base::Time GetWallclockTime() {
+  base::Time GetWallclockTime() override {
     return wallclock_time_;
   }
 
-  virtual base::Time GetMonotonicTime() {
+  base::Time GetMonotonicTime() override {
     return monotonic_time_;
   }
 
-  virtual base::Time GetBootTime() {
+  base::Time GetBootTime() override {
     return boot_time_;
   }
 
diff --git a/fake_p2p_manager.h b/fake_p2p_manager.h
index a00b91f..ce214e4 100644
--- a/fake_p2p_manager.h
+++ b/fake_p2p_manager.h
@@ -21,61 +21,59 @@
     perform_housekeeping_result_(false),
     count_shared_files_result_(0) {}
 
-  virtual ~FakeP2PManager() {}
-
   // P2PManager overrides.
-  virtual void SetDevicePolicy(const policy::DevicePolicy* device_policy) {}
+  void SetDevicePolicy(const policy::DevicePolicy* device_policy) override {}
 
-  virtual bool IsP2PEnabled() {
+  bool IsP2PEnabled() override {
     return is_p2p_enabled_;
   }
 
-  virtual bool EnsureP2PRunning() {
+  bool EnsureP2PRunning() override {
     return ensure_p2p_running_result_;
   }
 
-  virtual bool EnsureP2PNotRunning() {
+  bool EnsureP2PNotRunning() override {
     return ensure_p2p_not_running_result_;
   }
 
-  virtual bool PerformHousekeeping() {
+  bool PerformHousekeeping() override {
     return perform_housekeeping_result_;
   }
 
-  virtual void LookupUrlForFile(const std::string& file_id,
-                                size_t minimum_size,
-                                base::TimeDelta max_time_to_wait,
-                                LookupCallback callback) {
+  void LookupUrlForFile(const std::string& file_id,
+                        size_t minimum_size,
+                        base::TimeDelta max_time_to_wait,
+                        LookupCallback callback) override {
     callback.Run(lookup_url_for_file_result_);
   }
 
-  virtual bool FileShare(const std::string& file_id,
-                         size_t expected_size) {
+  bool FileShare(const std::string& file_id,
+                 size_t expected_size) override {
     return false;
   }
 
-  virtual base::FilePath FileGetPath(const std::string& file_id) {
+  base::FilePath FileGetPath(const std::string& file_id) override {
     return base::FilePath();
   }
 
-  virtual ssize_t FileGetSize(const std::string& file_id) {
+  ssize_t FileGetSize(const std::string& file_id) override {
     return -1;
   }
 
-  virtual ssize_t FileGetExpectedSize(const std::string& file_id) {
+  ssize_t FileGetExpectedSize(const std::string& file_id) override {
     return -1;
   }
 
-  virtual bool FileGetVisible(const std::string& file_id,
-                              bool *out_result) {
+  bool FileGetVisible(const std::string& file_id,
+                      bool *out_result) override {
     return false;
   }
 
-  virtual bool FileMakeVisible(const std::string& file_id) {
+  bool FileMakeVisible(const std::string& file_id) override {
     return false;
   }
 
-  virtual int CountSharedFiles() {
+  int CountSharedFiles() override {
     return count_shared_files_result_;
   }
 
diff --git a/fake_p2p_manager_configuration.h b/fake_p2p_manager_configuration.h
index 206fc57..6272689 100644
--- a/fake_p2p_manager_configuration.h
+++ b/fake_p2p_manager_configuration.h
@@ -39,18 +39,18 @@
   }
 
   // P2PManager::Configuration override
-  virtual base::FilePath GetP2PDir() {
+  base::FilePath GetP2PDir() override {
     return base::FilePath(p2p_dir_);
   }
 
   // P2PManager::Configuration override
-  virtual std::vector<std::string> GetInitctlArgs(bool is_start) {
+  std::vector<std::string> GetInitctlArgs(bool is_start) override {
     return is_start ? initctl_start_args_ : initctl_stop_args_;
   }
 
   // P2PManager::Configuration override
-  virtual std::vector<std::string> GetP2PClientArgs(const std::string &file_id,
-                                                    size_t minimum_size) {
+  std::vector<std::string> GetP2PClientArgs(const std::string &file_id,
+                                            size_t minimum_size) override {
     std::string formatted_command_line = p2p_client_cmdline_format_;
     // Replace {variable} on the passed string.
     ReplaceSubstringsAfterOffset(
diff --git a/file_descriptor.h b/file_descriptor.h
index 3b1f1b2..d86d4ca 100644
--- a/file_descriptor.h
+++ b/file_descriptor.h
@@ -82,19 +82,18 @@
 class EintrSafeFileDescriptor : public FileDescriptor {
  public:
   EintrSafeFileDescriptor() : fd_(-1) {}
-  virtual ~EintrSafeFileDescriptor() {}
 
   // Interface methods.
-  virtual bool Open(const char* path, int flags, mode_t mode);
-  virtual bool Open(const char* path, int flags);
-  virtual ssize_t Read(void* buf, size_t count);
-  virtual ssize_t Write(const void* buf, size_t count);
-  virtual bool Close();
-  virtual void Reset();
-  virtual bool IsSettingErrno() {
+  bool Open(const char* path, int flags, mode_t mode) override;
+  bool Open(const char* path, int flags) override;
+  ssize_t Read(void* buf, size_t count) override;
+  ssize_t Write(const void* buf, size_t count) override;
+  bool Close() override;
+  void Reset() override;
+  bool IsSettingErrno() override {
     return true;
   }
-  virtual bool IsOpen() {
+  bool IsOpen() override {
     return (fd_ >= 0);
   }
 
diff --git a/file_writer.h b/file_writer.h
index 7877ba5..f800643 100644
--- a/file_writer.h
+++ b/file_writer.h
@@ -58,11 +58,10 @@
 class DirectFileWriter : public FileWriter {
  public:
   DirectFileWriter() : fd_(-1) {}
-  virtual ~DirectFileWriter() {}
 
-  virtual int Open(const char* path, int flags, mode_t mode);
-  virtual bool Write(const void* bytes, size_t count);
-  virtual int Close();
+  int Open(const char* path, int flags, mode_t mode) override;
+  bool Write(const void* bytes, size_t count) override;
+  int Close() override;
 
   int fd() const { return fd_; }
 
diff --git a/filesystem_copier_action.h b/filesystem_copier_action.h
index 4ebe905..679ee61 100644
--- a/filesystem_copier_action.h
+++ b/filesystem_copier_action.h
@@ -32,8 +32,8 @@
                          bool copying_kernel_install_path,
                          bool verify_hash);
 
-  void PerformAction();
-  void TerminateProcessing();
+  void PerformAction() override;
+  void TerminateProcessing() override;
 
   // Used for testing. Return true if Cleanup() has not yet been called due
   // to a callback upon the completion or cancellation of the copier action.
@@ -46,7 +46,7 @@
 
   // Debugging/logging
   static std::string StaticType() { return "FilesystemCopierAction"; }
-  std::string Type() const { return StaticType(); }
+  std::string Type() const override { return StaticType(); }
 
  private:
   friend class FilesystemCopierActionTest;
diff --git a/filesystem_copier_action_unittest.cc b/filesystem_copier_action_unittest.cc
index 5c40fb3..5973fb6 100644
--- a/filesystem_copier_action_unittest.cc
+++ b/filesystem_copier_action_unittest.cc
@@ -38,10 +38,6 @@
               bool terminate_early,
               bool use_kernel_partition,
               int verify_hash);
-  void SetUp() {
-  }
-  void TearDown() {
-  }
 
   FakeSystemState fake_system_state_;
 };
diff --git a/hardware_interface.h b/hardware_interface.h
index 2c9c100..d5a1f1f 100644
--- a/hardware_interface.h
+++ b/hardware_interface.h
@@ -20,6 +20,8 @@
 // unit testing.
 class HardwareInterface {
  public:
+  virtual ~HardwareInterface() {}
+
   // Returns the currently booted kernel partition. "/dev/sda2", for example.
   virtual std::string BootKernelDevice() const = 0;
 
@@ -70,8 +72,6 @@
   // or is invalid, returns -1. Brand new machines out of the factory or after
   // recovery don't have this value set.
   virtual int GetPowerwashCount() const = 0;
-
-  virtual ~HardwareInterface() {}
 };
 
 }  // namespace chromeos_update_engine
diff --git a/http_fetcher_unittest.cc b/http_fetcher_unittest.cc
index ff52dfb..a45b10f 100644
--- a/http_fetcher_unittest.cc
+++ b/http_fetcher_unittest.cc
@@ -156,7 +156,7 @@
     Terminate(do_kill);
   }
 
-  virtual in_port_t GetPort() const {
+  in_port_t GetPort() const override {
     return port_;
   }
 
@@ -225,7 +225,7 @@
  public:
   // Necessary to unhide the definition in the base class.
   using AnyHttpFetcherTest::NewLargeFetcher;
-  virtual HttpFetcher* NewLargeFetcher(size_t num_proxies) {
+  HttpFetcher* NewLargeFetcher(size_t num_proxies) override {
     vector<char> big_data(1000000);
     CHECK_GT(num_proxies, 0u);
     proxy_resolver_.set_num_proxies(num_proxies);
@@ -237,7 +237,7 @@
 
   // Necessary to unhide the definition in the base class.
   using AnyHttpFetcherTest::NewSmallFetcher;
-  virtual HttpFetcher* NewSmallFetcher(size_t num_proxies) {
+  HttpFetcher* NewSmallFetcher(size_t num_proxies) override {
     CHECK_GT(num_proxies, 0u);
     proxy_resolver_.set_num_proxies(num_proxies);
     return new MockHttpFetcher(
@@ -246,10 +246,10 @@
         reinterpret_cast<ProxyResolver*>(&proxy_resolver_));
   }
 
-  virtual bool IsMock() const { return true; }
-  virtual bool IsMulti() const { return false; }
+  bool IsMock() const override { return true; }
+  bool IsMulti() const override { return false; }
 
-  virtual HttpServer *CreateServer() {
+  HttpServer *CreateServer() override {
     return new NullHttpServer;
   }
 };
@@ -258,7 +258,7 @@
  public:
   // Necessary to unhide the definition in the base class.
   using AnyHttpFetcherTest::NewLargeFetcher;
-  virtual HttpFetcher* NewLargeFetcher(size_t num_proxies) {
+  HttpFetcher* NewLargeFetcher(size_t num_proxies) override {
     CHECK_GT(num_proxies, 0u);
     proxy_resolver_.set_num_proxies(num_proxies);
     LibcurlHttpFetcher *ret = new
@@ -273,30 +273,30 @@
 
   // Necessary to unhide the definition in the base class.
   using AnyHttpFetcherTest::NewSmallFetcher;
-  virtual HttpFetcher* NewSmallFetcher(size_t num_proxies) {
+  HttpFetcher* NewSmallFetcher(size_t num_proxies) override {
     return NewLargeFetcher(num_proxies);
   }
 
-  virtual string BigUrl(in_port_t port) const {
+  string BigUrl(in_port_t port) const override {
     return LocalServerUrlForPath(port,
                                  base::StringPrintf("/download/%d",
                                                     kBigLength));
   }
-  virtual string SmallUrl(in_port_t port) const {
+  string SmallUrl(in_port_t port) const override {
     return LocalServerUrlForPath(port, "/foo");
   }
-  virtual string ErrorUrl(in_port_t port) const {
+  string ErrorUrl(in_port_t port) const override {
     return LocalServerUrlForPath(port, "/error");
   }
 
-  virtual bool IsMock() const { return false; }
-  virtual bool IsMulti() const { return false; }
+  bool IsMock() const override { return false; }
+  bool IsMulti() const override { return false; }
 
-  virtual void IgnoreServerAborting(HttpServer* server) const {
+  void IgnoreServerAborting(HttpServer* server) const override {
     // Nothing to do.
   }
 
-  virtual HttpServer *CreateServer() {
+  HttpServer *CreateServer() override {
     return new PythonHttpServer;
   }
 };
@@ -305,7 +305,7 @@
  public:
   // Necessary to unhide the definition in the base class.
   using AnyHttpFetcherTest::NewLargeFetcher;
-  virtual HttpFetcher* NewLargeFetcher(size_t num_proxies) {
+  HttpFetcher* NewLargeFetcher(size_t num_proxies) override {
     CHECK_GT(num_proxies, 0u);
     proxy_resolver_.set_num_proxies(num_proxies);
     ProxyResolver* resolver =
@@ -324,11 +324,11 @@
 
   // Necessary to unhide the definition in the base class.
   using AnyHttpFetcherTest::NewSmallFetcher;
-  virtual HttpFetcher* NewSmallFetcher(size_t num_proxies) {
+  HttpFetcher* NewSmallFetcher(size_t num_proxies) override {
     return NewLargeFetcher(num_proxies);
   }
 
-  virtual bool IsMulti() const { return true; }
+  bool IsMulti() const override { return true; }
 };
 
 
@@ -367,13 +367,13 @@
       is_expect_error_(false), times_transfer_complete_called_(0),
       times_transfer_terminated_called_(0), times_received_bytes_called_(0) {}
 
-  virtual void ReceivedBytes(HttpFetcher* /* fetcher */,
-                             const char* /* bytes */, int /* length */) {
+  void ReceivedBytes(HttpFetcher* /* fetcher */,
+                     const char* /* bytes */, int /* length */) override {
     // Update counters
     times_received_bytes_called_++;
   }
 
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     if (is_expect_error_)
       EXPECT_EQ(kHttpResponseNotFound, fetcher->http_response_code());
     else
@@ -384,7 +384,7 @@
     times_transfer_complete_called_++;
   }
 
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     ADD_FAILURE();
     times_transfer_terminated_called_++;
   }
@@ -494,16 +494,16 @@
 namespace {
 class PausingHttpFetcherTestDelegate : public HttpFetcherDelegate {
  public:
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* /* bytes */, int /* length */) {
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* /* bytes */, int /* length */) override {
     CHECK(!paused_);
     paused_ = true;
     fetcher->Pause();
   }
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     g_main_loop_quit(loop_);
   }
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     ADD_FAILURE();
   }
   void Unpause() {
@@ -551,13 +551,13 @@
 namespace {
 class AbortingHttpFetcherTestDelegate : public HttpFetcherDelegate {
  public:
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* bytes, int length) {}
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* bytes, int length) override {}
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     ADD_FAILURE();  // We should never get here
     g_main_loop_quit(loop_);
   }
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     EXPECT_EQ(fetcher, fetcher_.get());
     EXPECT_FALSE(once_);
     EXPECT_TRUE(callback_once_);
@@ -625,16 +625,16 @@
 namespace {
 class FlakyHttpFetcherTestDelegate : public HttpFetcherDelegate {
  public:
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* bytes, int length) {
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* bytes, int length) override {
     data.append(bytes, length);
   }
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     EXPECT_TRUE(successful);
     EXPECT_EQ(kHttpResponsePartialContent, fetcher->http_response_code());
     g_main_loop_quit(loop_);
   }
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     ADD_FAILURE();
   }
   string data;
@@ -687,7 +687,7 @@
       : loop_(nullptr),
         server_(server) {}
 
-  virtual ~FailureHttpFetcherTestDelegate() {
+  ~FailureHttpFetcherTestDelegate() override {
     if (server_) {
       LOG(INFO) << "Stopping server in destructor";
       delete server_;
@@ -695,8 +695,8 @@
     }
   }
 
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* bytes, int length) {
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* bytes, int length) override {
     if (server_) {
       LOG(INFO) << "Stopping server in ReceivedBytes";
       delete server_;
@@ -704,12 +704,12 @@
       server_ = nullptr;
     }
   }
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     EXPECT_FALSE(successful);
     EXPECT_EQ(0, fetcher->http_response_code());
     g_main_loop_quit(loop_);
   }
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     ADD_FAILURE();
   }
   GMainLoop* loop_;
@@ -787,11 +787,11 @@
  public:
   explicit RedirectHttpFetcherTestDelegate(bool expected_successful)
       : expected_successful_(expected_successful) {}
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* bytes, int length) {
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* bytes, int length) override {
     data.append(bytes, length);
   }
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     EXPECT_EQ(expected_successful_, successful);
     if (expected_successful_) {
       EXPECT_EQ(kHttpResponseOk, fetcher->http_response_code());
@@ -801,7 +801,7 @@
     }
     g_main_loop_quit(loop_);
   }
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     ADD_FAILURE();
   }
   bool expected_successful_;
@@ -892,13 +892,13 @@
   explicit MultiHttpFetcherTestDelegate(int expected_response_code)
       : expected_response_code_(expected_response_code) {}
 
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* bytes, int length) {
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* bytes, int length) override {
     EXPECT_EQ(fetcher, fetcher_.get());
     data.append(bytes, length);
   }
 
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     EXPECT_EQ(fetcher, fetcher_.get());
     EXPECT_EQ(expected_response_code_ != kHttpResponseUndefined, successful);
     if (expected_response_code_ != 0)
@@ -908,7 +908,7 @@
     g_main_loop_quit(loop_);
   }
 
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     ADD_FAILURE();
   }
 
@@ -1089,15 +1089,15 @@
 namespace {
 class BlockedTransferTestDelegate : public HttpFetcherDelegate {
  public:
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* bytes, int length) {
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* bytes, int length) override {
     ADD_FAILURE();
   }
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful) {
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override {
     EXPECT_FALSE(successful);
     g_main_loop_quit(loop_);
   }
-  virtual void TransferTerminated(HttpFetcher* fetcher) {
+  void TransferTerminated(HttpFetcher* fetcher) override {
     ADD_FAILURE();
   }
   GMainLoop* loop_;
diff --git a/hwid_override_unittest.cc b/hwid_override_unittest.cc
index 87d1682..44a114a 100644
--- a/hwid_override_unittest.cc
+++ b/hwid_override_unittest.cc
@@ -16,9 +16,9 @@
 class HwidOverrideTest : public ::testing::Test {
  public:
   HwidOverrideTest() {}
-  virtual ~HwidOverrideTest() {}
+  ~HwidOverrideTest() override = default;
 
-  virtual void SetUp() {
+  void SetUp() override {
     ASSERT_TRUE(tempdir_.CreateUniqueTempDir());
     ASSERT_TRUE(base::CreateDirectory(tempdir_.path().Append("etc")));
   }
diff --git a/install_plan.h b/install_plan.h
index 8ccabc6..c592889 100644
--- a/install_plan.h
+++ b/install_plan.h
@@ -98,7 +98,7 @@
   explicit InstallPlanAction(const InstallPlan& install_plan):
     install_plan_(install_plan) {}
 
-  virtual void PerformAction() {
+  void PerformAction() override {
     if (HasOutputPipe()) {
       SetOutputObject(install_plan_);
     }
@@ -108,7 +108,7 @@
   InstallPlan* install_plan() { return &install_plan_; }
 
   static std::string StaticType() { return "InstallPlanAction"; }
-  virtual std::string Type() const { return StaticType(); }
+  std::string Type() const override { return StaticType(); }
 
   typedef ActionTraits<InstallPlanAction>::InputObjectType InputObjectType;
   typedef ActionTraits<InstallPlanAction>::OutputObjectType OutputObjectType;
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index d483009..b341f6e 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -62,25 +62,25 @@
   }
 
   // Cleans up all internal state. Does not notify delegate
-  ~LibcurlHttpFetcher();
+  ~LibcurlHttpFetcher() override;
 
-  virtual void SetOffset(off_t offset) { bytes_downloaded_ = offset; }
+  void SetOffset(off_t offset) override { bytes_downloaded_ = offset; }
 
-  virtual void SetLength(size_t length) { download_length_ = length; }
-  virtual void UnsetLength() { SetLength(0); }
+  void SetLength(size_t length) override { download_length_ = length; }
+  void UnsetLength() override { SetLength(0); }
 
   // Begins the transfer if it hasn't already begun.
-  virtual void BeginTransfer(const std::string& url);
+  void BeginTransfer(const std::string& url) override;
 
   // If the transfer is in progress, aborts the transfer early. The transfer
   // cannot be resumed.
-  virtual void TerminateTransfer();
+  void TerminateTransfer() override;
 
   // Suspend the transfer by calling curl_easy_pause(CURLPAUSE_ALL).
-  virtual void Pause();
+  void Pause() override;
 
   // Resume the transfer by calling curl_easy_pause(CURLPAUSE_CONT).
-  virtual void Unpause();
+  void Unpause() override;
 
   // Libcurl sometimes asks to be called back after some time while
   // leaving that time unspecified. In that case, we pick a reasonable
@@ -91,10 +91,10 @@
   //     currently has no stored timeout value. You must not wait too long
   //     (more than a few seconds perhaps) before you call
   //     curl_multi_perform() again.
-  void set_idle_seconds(int seconds) { idle_seconds_ = seconds; }
+  void set_idle_seconds(int seconds) override { idle_seconds_ = seconds; }
 
   // Sets the retry timeout. Useful for testing.
-  void set_retry_seconds(int seconds) { retry_seconds_ = seconds; }
+  void set_retry_seconds(int seconds) override { retry_seconds_ = seconds; }
 
   void set_no_network_max_retries(int retries) {
     no_network_max_retries_ = retries;
@@ -105,20 +105,20 @@
     check_certificate_ = check_certificate;
   }
 
-  virtual size_t GetBytesDownloaded() {
+  size_t GetBytesDownloaded() override {
     return static_cast<size_t>(bytes_downloaded_);
   }
 
-  virtual void set_low_speed_limit(int low_speed_bps, int low_speed_sec) {
+  void set_low_speed_limit(int low_speed_bps, int low_speed_sec) override {
     low_speed_limit_bps_ = low_speed_bps;
     low_speed_time_seconds_ = low_speed_sec;
   }
 
-  virtual void set_connect_timeout(int connect_timeout_seconds) {
+  void set_connect_timeout(int connect_timeout_seconds) override {
     connect_timeout_seconds_ = connect_timeout_seconds;
   }
 
-  virtual void set_max_retry_count(int max_retry_count) {
+  void set_max_retry_count(int max_retry_count) override {
     max_retry_count_ = max_retry_count;
   }
 
diff --git a/mock_hardware.h b/mock_hardware.h
index 325b81a..bf26821 100644
--- a/mock_hardware.h
+++ b/mock_hardware.h
@@ -60,7 +60,7 @@
             &FakeHardware::GetPowerwashCount));
   }
 
-  virtual ~MockHardware() {}
+  ~MockHardware() override {}
 
   // Hardware overrides.
   MOCK_CONST_METHOD0(BootKernelDevice, std::string());
diff --git a/mock_http_fetcher.h b/mock_http_fetcher.h
index 4bf1685..b9d7cd7 100644
--- a/mock_http_fetcher.h
+++ b/mock_http_fetcher.h
@@ -47,39 +47,39 @@
   }
 
   // Cleans up all internal state. Does not notify delegate
-  ~MockHttpFetcher();
+  ~MockHttpFetcher() override;
 
   // Ignores this.
-  virtual void SetOffset(off_t offset) {
+  void SetOffset(off_t offset) override {
     sent_size_ = offset;
     if (delegate_)
       delegate_->SeekToOffset(offset);
   }
 
   // Do nothing.
-  virtual void SetLength(size_t length) {}
-  virtual void UnsetLength() {}
-  virtual void set_low_speed_limit(int low_speed_bps, int low_speed_sec) {}
-  virtual void set_connect_timeout(int connect_timeout_seconds) {}
-  virtual void set_max_retry_count(int max_retry_count) {}
+  void SetLength(size_t length) override {}
+  void UnsetLength() override {}
+  void set_low_speed_limit(int low_speed_bps, int low_speed_sec) override {}
+  void set_connect_timeout(int connect_timeout_seconds) override {}
+  void set_max_retry_count(int max_retry_count) override {}
 
   // Dummy: no bytes were downloaded.
-  virtual size_t GetBytesDownloaded() {
+  size_t GetBytesDownloaded() override {
     return sent_size_;
   }
 
   // Begins the transfer if it hasn't already begun.
-  virtual void BeginTransfer(const std::string& url);
+  void BeginTransfer(const std::string& url) override;
 
   // If the transfer is in progress, aborts the transfer early.
   // The transfer cannot be resumed.
-  virtual void TerminateTransfer();
+  void TerminateTransfer() override;
 
   // Suspend the mock transfer.
-  virtual void Pause();
+  void Pause() override;
 
   // Resume the mock transfer.
-  virtual void Unpause();
+  void Unpause() override;
 
   // Fail the transfer. This simulates a network failure.
   void FailTransfer(int http_response_code);
diff --git a/mock_p2p_manager.h b/mock_p2p_manager.h
index a0ed920..6b5a75e 100644
--- a/mock_p2p_manager.h
+++ b/mock_p2p_manager.h
@@ -60,7 +60,7 @@
             &FakeP2PManager::CountSharedFiles));
   }
 
-  virtual ~MockP2PManager() {}
+  ~MockP2PManager() override {}
 
   // P2PManager overrides.
   MOCK_METHOD1(SetDevicePolicy, void(const policy::DevicePolicy*));
diff --git a/multi_range_http_fetcher.h b/multi_range_http_fetcher.h
index ae25f45..1cdeb7b 100644
--- a/multi_range_http_fetcher.h
+++ b/multi_range_http_fetcher.h
@@ -42,7 +42,7 @@
         terminating_(false),
         current_index_(0),
         bytes_received_this_range_(0) {}
-  ~MultiRangeHttpFetcher() {}
+  ~MultiRangeHttpFetcher() override {}
 
   void ClearRanges() { ranges_.clear(); }
 
@@ -55,47 +55,50 @@
     ranges_.push_back(Range(offset));
   }
 
-  virtual void SetOffset(off_t offset) {}  // for now, doesn't support this
+  // HttpFetcher overrides.
+  void SetOffset(off_t offset) override {}  // for now, doesn't support this
 
-  virtual void SetLength(size_t length) {}  // unsupported
-  virtual void UnsetLength() {}
+  void SetLength(size_t length) override {}  // unsupported
+  void UnsetLength() override {}
 
   // Begins the transfer to the specified URL.
   // State change: Stopped -> Downloading
   // (corner case: Stopped -> Stopped for an empty request)
-  virtual void BeginTransfer(const std::string& url);
+  void BeginTransfer(const std::string& url) override;
 
   // State change: Downloading -> Pending transfer ended
-  virtual void TerminateTransfer();
+  void TerminateTransfer() override;
 
-  virtual void Pause() { base_fetcher_->Pause(); }
+  void Pause() override { base_fetcher_->Pause(); }
 
-  virtual void Unpause() { base_fetcher_->Unpause(); }
+  void Unpause() override { base_fetcher_->Unpause(); }
 
   // These functions are overloaded in LibcurlHttp fetcher for testing purposes.
-  virtual void set_idle_seconds(int seconds) {
+  void set_idle_seconds(int seconds) override {
     base_fetcher_->set_idle_seconds(seconds);
   }
-  virtual void set_retry_seconds(int seconds) {
+  void set_retry_seconds(int seconds) override {
     base_fetcher_->set_retry_seconds(seconds);
   }
+  // TODO(deymo): Determine if this method should be virtual in HttpFetcher so
+  // this call is sent to the base_fetcher_.
   virtual void SetProxies(const std::deque<std::string>& proxies) {
     base_fetcher_->SetProxies(proxies);
   }
 
-  inline virtual size_t GetBytesDownloaded() {
+  inline size_t GetBytesDownloaded() override {
     return base_fetcher_->GetBytesDownloaded();
   }
 
-  virtual void set_low_speed_limit(int low_speed_bps, int low_speed_sec) {
+  void set_low_speed_limit(int low_speed_bps, int low_speed_sec) override {
     base_fetcher_->set_low_speed_limit(low_speed_bps, low_speed_sec);
   }
 
-  virtual void set_connect_timeout(int connect_timeout_seconds) {
+  void set_connect_timeout(int connect_timeout_seconds) override {
     base_fetcher_->set_connect_timeout(connect_timeout_seconds);
   }
 
-  virtual void set_max_retry_count(int max_retry_count) {
+  void set_max_retry_count(int max_retry_count) override {
     base_fetcher_->set_max_retry_count(max_retry_count);
   }
 
@@ -125,16 +128,17 @@
   // State change: Stopped or Downloading -> Downloading
   void StartTransfer();
 
+  // HttpFetcherDelegate overrides.
   // State change: Downloading -> Downloading or Pending transfer ended
-  virtual void ReceivedBytes(HttpFetcher* fetcher,
-                             const char* bytes,
-                             int length);
+  void ReceivedBytes(HttpFetcher* fetcher,
+                     const char* bytes,
+                     int length) override;
 
   // State change: Pending transfer ended -> Stopped
   void TransferEnded(HttpFetcher* fetcher, bool successful);
   // These two call TransferEnded():
-  virtual void TransferComplete(HttpFetcher* fetcher, bool successful);
-  virtual void TransferTerminated(HttpFetcher* fetcher);
+  void TransferComplete(HttpFetcher* fetcher, bool successful) override;
+  void TransferTerminated(HttpFetcher* fetcher) override;
 
   void Reset();
 
diff --git a/omaha_request_action.h b/omaha_request_action.h
index 0b93109..d086a24 100644
--- a/omaha_request_action.h
+++ b/omaha_request_action.h
@@ -124,24 +124,25 @@
                      OmahaEvent* event,
                      HttpFetcher* http_fetcher,
                      bool ping_only);
-  virtual ~OmahaRequestAction();
+  ~OmahaRequestAction() override;
   typedef ActionTraits<OmahaRequestAction>::InputObjectType InputObjectType;
   typedef ActionTraits<OmahaRequestAction>::OutputObjectType OutputObjectType;
-  void PerformAction();
-  void TerminateProcessing();
-  void ActionCompleted(ErrorCode code);
+  void PerformAction() override;
+  void TerminateProcessing() override;
+  void ActionCompleted(ErrorCode code) override;
 
   int GetHTTPResponseCode() { return http_fetcher_->http_response_code(); }
 
   // Debugging/logging
   static std::string StaticType() { return "OmahaRequestAction"; }
-  std::string Type() const { return StaticType(); }
+  std::string Type() const override { return StaticType(); }
 
   // Delegate methods (see http_fetcher.h)
-  virtual void ReceivedBytes(HttpFetcher *fetcher,
-                             const char* bytes, int length);
+  void ReceivedBytes(HttpFetcher *fetcher,
+                     const char* bytes, int length) override;
 
-  virtual void TransferComplete(HttpFetcher *fetcher, bool successful);
+  void TransferComplete(HttpFetcher *fetcher, bool successful) override;
+
   // Returns true if this is an Event request, false if it's an UpdateCheck.
   bool IsEvent() const { return event_.get() != nullptr; }
 
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 227dde7..f358c39 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -50,7 +50,7 @@
 
 class OmahaRequestActionTest : public ::testing::Test {
  protected:
-  void SetUp() {
+  void SetUp() override {
     fake_system_state_.set_request_params(&request_params_);
     fake_system_state_.set_prefs(&fake_prefs_);
   }
@@ -223,7 +223,7 @@
   OmahaRequestActionTestProcessorDelegate()
       : loop_(nullptr),
         expected_code_(ErrorCode::kSuccess) {}
-  virtual ~OmahaRequestActionTestProcessorDelegate() {
+  ~OmahaRequestActionTestProcessorDelegate() override {
   }
   virtual void ProcessingDone(const ActionProcessor* processor,
                               ErrorCode code) {
diff --git a/omaha_request_params_unittest.cc b/omaha_request_params_unittest.cc
index 6458d3a..82d74f1 100644
--- a/omaha_request_params_unittest.cc
+++ b/omaha_request_params_unittest.cc
@@ -33,7 +33,7 @@
   bool DoTest(OmahaRequestParams* out, const string& app_version,
               const string& omaha_url);
 
-  virtual void SetUp() {
+  void SetUp() override {
     // Create a uniquely named test directory.
     ASSERT_TRUE(utils::MakeTempDirectory(kTestDirTemplate,
                                          &test_dir_));
@@ -49,7 +49,7 @@
     params_.SetLockDown(false);
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     EXPECT_EQ(0, System(string("rm -rf ") + test_dir_));
   }
 
diff --git a/omaha_response_handler_action.h b/omaha_response_handler_action.h
index da9550d..c3e4a68 100644
--- a/omaha_response_handler_action.h
+++ b/omaha_response_handler_action.h
@@ -38,11 +38,11 @@
       InputObjectType;
   typedef ActionTraits<OmahaResponseHandlerAction>::OutputObjectType
       OutputObjectType;
-  void PerformAction();
+  void PerformAction() override;
 
   // This is a synchronous action, and thus TerminateProcessing() should
   // never be called
-  void TerminateProcessing() { CHECK(false); }
+  void TerminateProcessing() override { CHECK(false); }
 
   // For unit-testing
   void set_boot_device(const std::string& boot_device) {
@@ -54,7 +54,7 @@
 
   // Debugging/logging
   static std::string StaticType() { return "OmahaResponseHandlerAction"; }
-  std::string Type() const { return StaticType(); }
+  std::string Type() const override { return StaticType(); }
   void set_key_path(const std::string& path) { key_path_ = path; }
 
  private:
diff --git a/p2p_manager.cc b/p2p_manager.cc
index 95623e9..8d519fa 100644
--- a/p2p_manager.cc
+++ b/p2p_manager.cc
@@ -72,13 +72,11 @@
  public:
   ConfigurationImpl() {}
 
-  virtual ~ConfigurationImpl() {}
-
-  virtual FilePath GetP2PDir() {
+  FilePath GetP2PDir() override {
     return FilePath(kDefaultP2PDir);
   }
 
-  virtual vector<string> GetInitctlArgs(bool is_start) {
+  vector<string> GetInitctlArgs(bool is_start) override {
     vector<string> args;
     args.push_back("initctl");
     args.push_back(is_start ? "start" : "stop");
@@ -86,8 +84,8 @@
     return args;
   }
 
-  virtual vector<string> GetP2PClientArgs(const string &file_id,
-                                          size_t minimum_size) {
+  vector<string> GetP2PClientArgs(const string &file_id,
+                                  size_t minimum_size) override {
     vector<string> args;
     args.push_back("p2p-client");
     args.push_back(string("--get-url=") + file_id);
@@ -110,24 +108,24 @@
                  const base::TimeDelta& max_file_age);
 
   // P2PManager methods.
-  virtual void SetDevicePolicy(const policy::DevicePolicy* device_policy);
-  virtual bool IsP2PEnabled();
-  virtual bool EnsureP2PRunning();
-  virtual bool EnsureP2PNotRunning();
-  virtual bool PerformHousekeeping();
-  virtual void LookupUrlForFile(const string& file_id,
-                                size_t minimum_size,
-                                TimeDelta max_time_to_wait,
-                                LookupCallback callback);
-  virtual bool FileShare(const string& file_id,
-                         size_t expected_size);
-  virtual FilePath FileGetPath(const string& file_id);
-  virtual ssize_t FileGetSize(const string& file_id);
-  virtual ssize_t FileGetExpectedSize(const string& file_id);
-  virtual bool FileGetVisible(const string& file_id,
-                              bool *out_result);
-  virtual bool FileMakeVisible(const string& file_id);
-  virtual int CountSharedFiles();
+  void SetDevicePolicy(const policy::DevicePolicy* device_policy) override;
+  bool IsP2PEnabled() override;
+  bool EnsureP2PRunning() override;
+  bool EnsureP2PNotRunning() override;
+  bool PerformHousekeeping() override;
+  void LookupUrlForFile(const string& file_id,
+                        size_t minimum_size,
+                        TimeDelta max_time_to_wait,
+                        LookupCallback callback) override;
+  bool FileShare(const string& file_id,
+                 size_t expected_size) override;
+  FilePath FileGetPath(const string& file_id) override;
+  ssize_t FileGetSize(const string& file_id) override;
+  ssize_t FileGetExpectedSize(const string& file_id) override;
+  bool FileGetVisible(const string& file_id,
+                      bool *out_result) override;
+  bool FileMakeVisible(const string& file_id) override;
+  int CountSharedFiles() override;
 
  private:
   // Enumeration for specifying visibility.
diff --git a/p2p_manager_unittest.cc b/p2p_manager_unittest.cc
index 12b6709..79804f3 100644
--- a/p2p_manager_unittest.cc
+++ b/p2p_manager_unittest.cc
@@ -46,10 +46,10 @@
 class P2PManagerTest : public testing::Test {
  protected:
   P2PManagerTest() : fake_um_(&fake_clock_) {}
-  virtual ~P2PManagerTest() {}
+  ~P2PManagerTest() override {}
 
   // Derived from testing::Test.
-  virtual void SetUp() {
+  void SetUp() override {
     test_conf_ = new FakeP2PManagerConfiguration();
 
     // Allocate and install a mock policy implementation in the fake Update
@@ -63,7 +63,7 @@
                                          "cros_au", 3,
                                          base::TimeDelta::FromDays(5)));
   }
-  virtual void TearDown() {}
+  void TearDown() override {}
 
   // The P2PManager::Configuration instance used for testing.
   FakeP2PManagerConfiguration *test_conf_;
diff --git a/payload_generator/delta_diff_generator_unittest.cc b/payload_generator/delta_diff_generator_unittest.cc
index c6cd65d..9febf70 100644
--- a/payload_generator/delta_diff_generator_unittest.cc
+++ b/payload_generator/delta_diff_generator_unittest.cc
@@ -64,14 +64,14 @@
   const string& old_path() { return old_path_; }
   const string& new_path() { return new_path_; }
 
-  virtual void SetUp() {
+  void SetUp() override {
     ASSERT_TRUE(utils::MakeTempFile("DeltaDiffGeneratorTest-old_path-XXXXXX",
                                     &old_path_, nullptr));
     ASSERT_TRUE(utils::MakeTempFile("DeltaDiffGeneratorTest-new_path-XXXXXX",
                                     &new_path_, nullptr));
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     unlink(old_path().c_str());
     unlink(new_path().c_str());
   }
diff --git a/payload_generator/filesystem_iterator_unittest.cc b/payload_generator/filesystem_iterator_unittest.cc
index 16f2c6d..3e72069 100644
--- a/payload_generator/filesystem_iterator_unittest.cc
+++ b/payload_generator/filesystem_iterator_unittest.cc
@@ -28,13 +28,13 @@
 
 class FilesystemIteratorTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     ASSERT_TRUE(utils::MakeTempDirectory("FilesystemIteratorTest-XXXXXX",
                                          &test_dir_));
     LOG(INFO) << "SetUp() mkdir " << test_dir_;
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     LOG(INFO) << "TearDown() rmdir " << test_dir_;
     EXPECT_EQ(0, System(base::StringPrintf("rm -rf %s", TestDir())));
   }
diff --git a/payload_state.h b/payload_state.h
index a301ceb..7def799 100644
--- a/payload_state.h
+++ b/payload_state.h
@@ -28,7 +28,7 @@
 class PayloadState : public PayloadStateInterface {
  public:
   PayloadState();
-  virtual ~PayloadState() {}
+  ~PayloadState() override {}
 
   // Initializes a payload state object using the given global system state.
   // It performs the initial loading of all persisted state into memory and
@@ -37,81 +37,81 @@
   bool Initialize(SystemState* system_state);
 
   // Implementation of PayloadStateInterface methods.
-  virtual void SetResponse(const OmahaResponse& response);
-  virtual void DownloadComplete();
-  virtual void DownloadProgress(size_t count);
-  virtual void UpdateResumed();
-  virtual void UpdateRestarted();
-  virtual void UpdateSucceeded();
-  virtual void UpdateFailed(ErrorCode error);
-  virtual void ResetUpdateStatus();
-  virtual bool ShouldBackoffDownload();
-  virtual void Rollback();
-  virtual void ExpectRebootInNewVersion(const std::string& target_version_uid);
-  virtual void SetUsingP2PForDownloading(bool value);
+  void SetResponse(const OmahaResponse& response) override;
+  void DownloadComplete() override;
+  void DownloadProgress(size_t count) override;
+  void UpdateResumed() override;
+  void UpdateRestarted() override;
+  void UpdateSucceeded() override;
+  void UpdateFailed(ErrorCode error) override;
+  void ResetUpdateStatus() override;
+  bool ShouldBackoffDownload() override;
+  void Rollback() override;
+  void ExpectRebootInNewVersion(const std::string& target_version_uid) override;
+  void SetUsingP2PForDownloading(bool value) override;
 
   void SetUsingP2PForSharing(bool value) override {
     using_p2p_for_sharing_ = value;
   }
 
-  virtual inline std::string GetResponseSignature() {
+  inline std::string GetResponseSignature() override {
     return response_signature_;
   }
 
-  virtual inline int GetFullPayloadAttemptNumber() {
+  inline int GetFullPayloadAttemptNumber() override {
     return full_payload_attempt_number_;
   }
 
-  virtual inline int GetPayloadAttemptNumber() {
+  inline int GetPayloadAttemptNumber() override {
     return payload_attempt_number_;
   }
 
-  virtual inline std::string GetCurrentUrl() {
+  inline std::string GetCurrentUrl() override {
     return candidate_urls_.size() ? candidate_urls_[url_index_] : "";
   }
 
-  virtual inline uint32_t GetUrlFailureCount() {
+  inline uint32_t GetUrlFailureCount() override {
     return url_failure_count_;
   }
 
-  virtual inline uint32_t GetUrlSwitchCount() {
+  inline uint32_t GetUrlSwitchCount() override {
     return url_switch_count_;
   }
 
-  virtual inline int GetNumResponsesSeen() {
+  inline int GetNumResponsesSeen() override {
     return num_responses_seen_;
   }
 
-  virtual inline base::Time GetBackoffExpiryTime() {
+  inline base::Time GetBackoffExpiryTime() override {
     return backoff_expiry_time_;
   }
 
-  virtual base::TimeDelta GetUpdateDuration();
+  base::TimeDelta GetUpdateDuration() override;
 
-  virtual base::TimeDelta GetUpdateDurationUptime();
+  base::TimeDelta GetUpdateDurationUptime() override;
 
-  virtual inline uint64_t GetCurrentBytesDownloaded(DownloadSource source) {
+  inline uint64_t GetCurrentBytesDownloaded(DownloadSource source) override {
     return source < kNumDownloadSources ? current_bytes_downloaded_[source] : 0;
   }
 
-  virtual inline uint64_t GetTotalBytesDownloaded(DownloadSource source) {
+  inline uint64_t GetTotalBytesDownloaded(DownloadSource source) override {
     return source < kNumDownloadSources ? total_bytes_downloaded_[source] : 0;
   }
 
-  virtual inline uint32_t GetNumReboots() {
+  inline uint32_t GetNumReboots() override {
     return num_reboots_;
   }
 
-  virtual void UpdateEngineStarted();
+  void UpdateEngineStarted() override;
 
-  virtual inline std::string GetRollbackVersion() {
+  inline std::string GetRollbackVersion() override {
     return rollback_version_;
   }
 
-  virtual int GetP2PNumAttempts();
-  virtual base::Time GetP2PFirstAttemptTimestamp();
-  virtual void P2PNewAttempt();
-  virtual bool P2PAttemptAllowed();
+  int GetP2PNumAttempts() override;
+  base::Time GetP2PFirstAttemptTimestamp() override;
+  void P2PNewAttempt() override;
+  bool P2PAttemptAllowed() override;
 
   bool GetUsingP2PForDownloading() const override {
     return using_p2p_for_downloading_;
diff --git a/prefs.h b/prefs.h
index fd86dde..1c4ec4f 100644
--- a/prefs.h
+++ b/prefs.h
@@ -27,15 +27,15 @@
   bool Init(const base::FilePath& prefs_dir);
 
   // PrefsInterface methods.
-  bool GetString(const std::string& key, std::string* value);
-  bool SetString(const std::string& key, const std::string& value);
-  bool GetInt64(const std::string& key, int64_t* value);
-  bool SetInt64(const std::string& key, const int64_t value);
-  bool GetBoolean(const std::string& key, bool* value);
-  bool SetBoolean(const std::string& key, const bool value);
+  bool GetString(const std::string& key, std::string* value) override;
+  bool SetString(const std::string& key, const std::string& value) override;
+  bool GetInt64(const std::string& key, int64_t* value) override;
+  bool SetInt64(const std::string& key, const int64_t value) override;
+  bool GetBoolean(const std::string& key, bool* value) override;
+  bool SetBoolean(const std::string& key, const bool value) override;
 
-  bool Exists(const std::string& key);
-  bool Delete(const std::string& key);
+  bool Exists(const std::string& key) override;
+  bool Delete(const std::string& key) override;
 
  private:
   FRIEND_TEST(PrefsTest, GetFileNameForKey);
diff --git a/prefs_interface.h b/prefs_interface.h
index 6c0a741..cdc6efe 100644
--- a/prefs_interface.h
+++ b/prefs_interface.h
@@ -18,6 +18,8 @@
 
 class PrefsInterface {
  public:
+  virtual ~PrefsInterface() {}
+
   // Gets a string |value| associated with |key|. Returns true on
   // success, false on failure (including when the |key| is not
   // present in the store).
@@ -52,8 +54,6 @@
   // Returns true if successfully deleted the file corresponding to
   // this key. Calling with non-existent keys does nothing.
   virtual bool Delete(const std::string& key) = 0;
-
-  virtual ~PrefsInterface() {}
 };
 
 }  // namespace chromeos_update_engine
diff --git a/prefs_unittest.cc b/prefs_unittest.cc
index 18633e1..fd36acc 100644
--- a/prefs_unittest.cc
+++ b/prefs_unittest.cc
@@ -20,12 +20,12 @@
 
 class PrefsTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     ASSERT_TRUE(base::CreateNewTempDirectory("auprefs", &prefs_dir_));
     ASSERT_TRUE(prefs_.Init(prefs_dir_));
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     base::DeleteFile(prefs_dir_, true);  // recursive
   }
 
diff --git a/proxy_resolver.h b/proxy_resolver.h
index 1a924bd..d59b888 100644
--- a/proxy_resolver.h
+++ b/proxy_resolver.h
@@ -46,10 +46,10 @@
 class DirectProxyResolver : public ProxyResolver {
  public:
   DirectProxyResolver() : idle_callback_id_(0), num_proxies_(1) {}
-  virtual ~DirectProxyResolver();
-  virtual bool GetProxiesForUrl(const std::string& url,
-                                ProxiesResolvedFn callback,
-                                void* data);
+  ~DirectProxyResolver() override;
+  bool GetProxiesForUrl(const std::string& url,
+                        ProxiesResolvedFn callback,
+                        void* data) override;
 
   // Set the number of direct (non-) proxies to be returned by resolver.
   // The default value is 1; higher numbers are currently used in testing.
diff --git a/terminator_unittest.cc b/terminator_unittest.cc
index 5e6b2e0..5a6f4e2 100644
--- a/terminator_unittest.cc
+++ b/terminator_unittest.cc
@@ -13,12 +13,12 @@
 
 class TerminatorTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     Terminator::Init();
     ASSERT_FALSE(Terminator::exit_blocked());
     ASSERT_FALSE(Terminator::exit_requested());
   }
-  virtual void TearDown() {
+  void TearDown() override {
     // Makes sure subsequent non-Terminator tests don't get accidentally
     // terminated.
     Terminator::Init();
diff --git a/update_attempter.h b/update_attempter.h
index 6702f1b..eca60c7 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -61,7 +61,7 @@
 
   UpdateAttempter(SystemState* system_state,
                   DBusWrapperInterface* dbus_iface);
-  virtual ~UpdateAttempter();
+  ~UpdateAttempter() override;
 
   // Further initialization to be done post construction.
   void Init();
@@ -84,11 +84,12 @@
                       bool interactive);
 
   // ActionProcessorDelegate methods:
-  void ProcessingDone(const ActionProcessor* processor, ErrorCode code);
-  void ProcessingStopped(const ActionProcessor* processor);
+  void ProcessingDone(const ActionProcessor* processor,
+                      ErrorCode code) override;
+  void ProcessingStopped(const ActionProcessor* processor) override;
   void ActionCompleted(ActionProcessor* processor,
                        AbstractAction* action,
-                       ErrorCode code);
+                       ErrorCode code) override;
 
   // Stop updating. An attempt will be made to record status to the disk
   // so that updates can be resumed later.
@@ -163,8 +164,8 @@
   bool RebootIfNeeded();
 
   // DownloadActionDelegate methods
-  void SetDownloadStatus(bool active);
-  void BytesReceived(uint64_t bytes_received, uint64_t total);
+  void SetDownloadStatus(bool active) override;
+  void BytesReceived(uint64_t bytes_received, uint64_t total) override;
 
   // Broadcasts the current status over D-Bus.
   void BroadcastStatus();
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 1d1542b..8eec668 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -105,7 +105,7 @@
     attempter_.set_good_kernel_cmd_ = "/path/to/non-existent/command";
   }
 
-  virtual void SetUp() {
+  void SetUp() override {
     CHECK(utils::MakeTempDirectory("UpdateAttempterTest-XXXXXX", &test_dir_));
 
     EXPECT_EQ(nullptr, attempter_.dbus_service_);
@@ -140,7 +140,7 @@
         .WillRepeatedly(ReturnPointee(&actual_using_p2p_for_sharing_));
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     test_utils::RecursiveUnlinkDir(test_dir_);
   }
 
diff --git a/update_manager/chromeos_policy.h b/update_manager/chromeos_policy.h
index 6f6fbb2..e400cdc 100644
--- a/update_manager/chromeos_policy.h
+++ b/update_manager/chromeos_policy.h
@@ -40,7 +40,7 @@
 class ChromeOSPolicy : public Policy {
  public:
   ChromeOSPolicy() {}
-  virtual ~ChromeOSPolicy() {}
+  ~ChromeOSPolicy() override {}
 
   // Policy overrides.
   EvalStatus UpdateCheckAllowed(
diff --git a/update_manager/chromeos_policy_unittest.cc b/update_manager/chromeos_policy_unittest.cc
index 77adfbe..34d8150 100644
--- a/update_manager/chromeos_policy_unittest.cc
+++ b/update_manager/chromeos_policy_unittest.cc
@@ -30,7 +30,7 @@
 
 class UmChromeOSPolicyTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     SetUpDefaultClock();
     eval_ctx_ = new EvaluationContext(&fake_clock_, TimeDelta::FromSeconds(5));
     SetUpDefaultState();
diff --git a/update_manager/default_policy.h b/update_manager/default_policy.h
index dccbc87..294afea 100644
--- a/update_manager/default_policy.h
+++ b/update_manager/default_policy.h
@@ -50,7 +50,7 @@
  public:
   explicit DefaultPolicy(chromeos_update_engine::ClockInterface* clock);
   DefaultPolicy() : DefaultPolicy(nullptr) {}
-  virtual ~DefaultPolicy() {}
+  ~DefaultPolicy() override {}
 
   // Policy overrides.
   EvalStatus UpdateCheckAllowed(
diff --git a/update_manager/device_policy_provider.h b/update_manager/device_policy_provider.h
index b0b9d36..1259610 100644
--- a/update_manager/device_policy_provider.h
+++ b/update_manager/device_policy_provider.h
@@ -20,7 +20,7 @@
 // Provides access to the current DevicePolicy.
 class DevicePolicyProvider : public Provider {
  public:
-  virtual ~DevicePolicyProvider() {}
+  ~DevicePolicyProvider() override {}
 
   // Variable stating whether the DevicePolicy was loaded.
   virtual Variable<bool>* var_device_policy_is_loaded() = 0;
diff --git a/update_manager/evaluation_context.h b/update_manager/evaluation_context.h
index e7fba00..ecb37e0 100644
--- a/update_manager/evaluation_context.h
+++ b/update_manager/evaluation_context.h
@@ -119,7 +119,7 @@
   friend class UmEvaluationContextTest;
 
   // BaseVariable::ObserverInterface override.
-  void ValueChanged(BaseVariable* var);
+  void ValueChanged(BaseVariable* var) override;
 
   // Called from the main loop when a scheduled timeout has passed.
   void OnTimeout();
diff --git a/update_manager/evaluation_context_unittest.cc b/update_manager/evaluation_context_unittest.cc
index c5cc883..b945301 100644
--- a/update_manager/evaluation_context_unittest.cc
+++ b/update_manager/evaluation_context_unittest.cc
@@ -71,7 +71,7 @@
 
 class UmEvaluationContextTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     // Apr 22, 2009 19:25:00 UTC (this is a random reference point).
     fake_clock_.SetMonotonicTime(Time::FromTimeT(1240428300));
     // Mar 2, 2006 1:23:45 UTC.
@@ -81,7 +81,7 @@
         unique_ptr<base::Callback<void(EvaluationContext*)>>(nullptr));
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     // Ensure that the evaluation context did not leak and is actually being
     // destroyed.
     if (eval_ctx_) {
diff --git a/update_manager/fake_state.h b/update_manager/fake_state.h
index 9c1ff01..b803890 100644
--- a/update_manager/fake_state.h
+++ b/update_manager/fake_state.h
@@ -31,7 +31,7 @@
   // Creates and initializes the FakeState using fake providers.
   FakeState() {}
 
-  virtual ~FakeState() {}
+  ~FakeState() override {}
 
   // Downcasted getters to access the fake instances during testing.
   FakeConfigProvider* config_provider() override {
diff --git a/update_manager/fake_variable.h b/update_manager/fake_variable.h
index 9459fac..5b9facc 100644
--- a/update_manager/fake_variable.h
+++ b/update_manager/fake_variable.h
@@ -21,7 +21,7 @@
       : Variable<T>(name, mode) {}
   FakeVariable(const std::string& name, base::TimeDelta poll_interval)
       : Variable<T>(name, poll_interval) {}
-  virtual ~FakeVariable() {}
+  ~FakeVariable() override {}
 
   // Sets the next value of this variable to the passed |p_value| pointer. Once
   // returned by GetValue(), the pointer is released and has to be set again.
diff --git a/update_manager/generic_variables.h b/update_manager/generic_variables.h
index ad9f0c1..b1b059f 100644
--- a/update_manager/generic_variables.h
+++ b/update_manager/generic_variables.h
@@ -69,8 +69,8 @@
   FRIEND_TEST(UmPollCopyVariableTest, UseCopyConstructorTest);
 
   // Variable override.
-  virtual inline const T* GetValue(base::TimeDelta /* timeout */,
-                                   std::string* errmsg) {
+  inline const T* GetValue(base::TimeDelta /* timeout */,
+                           std::string* errmsg) override {
     if (is_set_p_ && !(*is_set_p_)) {
       if (errmsg) {
         if (errmsg_.empty())
@@ -108,8 +108,8 @@
 
  protected:
   // Variable override.
-  virtual const T* GetValue(base::TimeDelta /* timeout */,
-                            std::string* /* errmsg */) {
+  const T* GetValue(base::TimeDelta /* timeout */,
+                    std::string* /* errmsg */) override {
     return new T(obj_);
   }
 
@@ -132,8 +132,8 @@
 
  protected:
   // Variable override.
-  virtual const T* GetValue(base::TimeDelta /* timeout */,
-                            std::string* /* errmsg */) {
+  const T* GetValue(base::TimeDelta /* timeout */,
+                    std::string* /* errmsg */) override {
     if (func_.is_null())
       return nullptr;
     return new T(func_.Run());
@@ -183,8 +183,8 @@
 
  protected:
   // Variable override.
-  virtual const T* GetValue(base::TimeDelta /* timeout */,
-                            std::string* errmsg) {
+  const T* GetValue(base::TimeDelta /* timeout */,
+                    std::string* errmsg) override {
     if (!has_value_) {
       if (errmsg)
         *errmsg = "No value set for " + this->GetName();
diff --git a/update_manager/generic_variables_unittest.cc b/update_manager/generic_variables_unittest.cc
index 7de6725..65f7f51 100644
--- a/update_manager/generic_variables_unittest.cc
+++ b/update_manager/generic_variables_unittest.cc
@@ -133,7 +133,7 @@
 
 class UmAsyncCopyVariableTest : public ::testing::Test {
  public:
-  void TearDown() {
+  void TearDown() override {
     // No remaining event on the main loop.
     EXPECT_EQ(0, RunGMainLoopMaxIterations(1));
   }
diff --git a/update_manager/mock_policy.h b/update_manager/mock_policy.h
index aff74f5..24a6ee8 100644
--- a/update_manager/mock_policy.h
+++ b/update_manager/mock_policy.h
@@ -42,7 +42,7 @@
   }
 
   MockPolicy() : MockPolicy(nullptr) {}
-  virtual ~MockPolicy() {}
+  ~MockPolicy() override {}
 
   // Policy overrides.
   MOCK_CONST_METHOD4(UpdateCheckAllowed,
diff --git a/update_manager/random_provider.h b/update_manager/random_provider.h
index fef5c35..7c22863 100644
--- a/update_manager/random_provider.h
+++ b/update_manager/random_provider.h
@@ -13,7 +13,7 @@
 // Provider of random values.
 class RandomProvider : public Provider {
  public:
-  virtual ~RandomProvider() {}
+  ~RandomProvider() override {}
 
   // Return a random number every time it is requested. Note that values
   // returned by the variables are cached by the EvaluationContext, so the
diff --git a/update_manager/real_config_provider_unittest.cc b/update_manager/real_config_provider_unittest.cc
index 09f9fc0..f6ddb7c 100644
--- a/update_manager/real_config_provider_unittest.cc
+++ b/update_manager/real_config_provider_unittest.cc
@@ -24,7 +24,7 @@
 
 class UmRealConfigProviderTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     ASSERT_TRUE(root_dir_.CreateUniqueTempDir());
     provider_.reset(new RealConfigProvider(&fake_hardware_));
     provider_->SetRootPrefix(root_dir_.path().value());
diff --git a/update_manager/real_device_policy_provider_unittest.cc b/update_manager/real_device_policy_provider_unittest.cc
index 0ed2615..a0a3333 100644
--- a/update_manager/real_device_policy_provider_unittest.cc
+++ b/update_manager/real_device_policy_provider_unittest.cc
@@ -29,14 +29,14 @@
 
 class UmRealDevicePolicyProviderTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     provider_.reset(new RealDevicePolicyProvider(&mock_policy_provider_));
     // By default, we have a device policy loaded. Tests can call
     // SetUpNonExistentDevicePolicy() to override this.
     SetUpExistentDevicePolicy();
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     // Check for leaked callbacks on the main loop.
     EXPECT_EQ(0, RunGMainLoopMaxIterations(100));
   }
diff --git a/update_manager/real_random_provider.cc b/update_manager/real_random_provider.cc
index 47cb31d..add26e5 100644
--- a/update_manager/real_random_provider.cc
+++ b/update_manager/real_random_provider.cc
@@ -34,7 +34,7 @@
   // policy request.
   RandomSeedVariable(const string& name, FILE* fp)
       : Variable<uint64_t>(name, kVariableModeConst), fp_(fp) {}
-  virtual ~RandomSeedVariable() {}
+  ~RandomSeedVariable() override {}
 
  protected:
   virtual const uint64_t* GetValue(base::TimeDelta /* timeout */,
diff --git a/update_manager/real_random_provider_unittest.cc b/update_manager/real_random_provider_unittest.cc
index 0deba4c..899ef6f 100644
--- a/update_manager/real_random_provider_unittest.cc
+++ b/update_manager/real_random_provider_unittest.cc
@@ -16,7 +16,7 @@
 
 class UmRealRandomProviderTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     // The provider initializes correctly.
     provider_.reset(new RealRandomProvider());
     ASSERT_NE(nullptr, provider_.get());
diff --git a/update_manager/real_shill_provider.h b/update_manager/real_shill_provider.h
index 716a7dd..1cceadf 100644
--- a/update_manager/real_shill_provider.h
+++ b/update_manager/real_shill_provider.h
@@ -29,7 +29,7 @@
   RealShillProvider(DBusWrapperInterface* dbus, ClockInterface* clock)
       : dbus_(dbus), clock_(clock) {}
 
-  virtual ~RealShillProvider();
+  ~RealShillProvider() override;
 
   // Initializes the provider and returns whether it succeeded.
   bool Init();
diff --git a/update_manager/real_shill_provider_unittest.cc b/update_manager/real_shill_provider_unittest.cc
index 641a5c3..bca45e2 100644
--- a/update_manager/real_shill_provider_unittest.cc
+++ b/update_manager/real_shill_provider_unittest.cc
@@ -63,14 +63,14 @@
 
 class UmRealShillProviderTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     // By default, initialize the provider so that it gets an initial connection
     // status from shill. This simulates the common case where shill is
     // available and responding during RealShillProvider initialization.
     Init(true);
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     Shutdown();
   }
 
diff --git a/update_manager/real_state.h b/update_manager/real_state.h
index 824656f..ac70648 100644
--- a/update_manager/real_state.h
+++ b/update_manager/real_state.h
@@ -14,7 +14,7 @@
 // State concrete implementation.
 class RealState : public State {
  public:
-  virtual ~RealState() {}
+  ~RealState() override {}
 
   RealState(ConfigProvider* config_provider,
             DevicePolicyProvider* device_policy_provider,
diff --git a/update_manager/real_system_provider_unittest.cc b/update_manager/real_system_provider_unittest.cc
index e370274..41222d9 100644
--- a/update_manager/real_system_provider_unittest.cc
+++ b/update_manager/real_system_provider_unittest.cc
@@ -18,7 +18,7 @@
 
 class UmRealSystemProviderTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     provider_.reset(new RealSystemProvider(&fake_hardware_));
     EXPECT_TRUE(provider_->Init());
   }
diff --git a/update_manager/real_time_provider_unittest.cc b/update_manager/real_time_provider_unittest.cc
index 7e27a4e..90bd3c1 100644
--- a/update_manager/real_time_provider_unittest.cc
+++ b/update_manager/real_time_provider_unittest.cc
@@ -21,7 +21,7 @@
 
 class UmRealTimeProviderTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     // The provider initializes correctly.
     provider_.reset(new RealTimeProvider(&fake_clock_));
     ASSERT_NE(nullptr, provider_.get());
diff --git a/update_manager/real_updater_provider_unittest.cc b/update_manager/real_updater_provider_unittest.cc
index e253d39..f1511dd 100644
--- a/update_manager/real_updater_provider_unittest.cc
+++ b/update_manager/real_updater_provider_unittest.cc
@@ -62,7 +62,7 @@
 
 class UmRealUpdaterProviderTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     fake_clock_ = fake_sys_state_.fake_clock();
     provider_.reset(new RealUpdaterProvider(&fake_sys_state_));
     ASSERT_NE(nullptr, provider_.get());
diff --git a/update_manager/shill_provider.h b/update_manager/shill_provider.h
index b7e47b6..89d3b97 100644
--- a/update_manager/shill_provider.h
+++ b/update_manager/shill_provider.h
@@ -31,7 +31,7 @@
 // Provider for networking related information.
 class ShillProvider : public Provider {
  public:
-  virtual ~ShillProvider() {}
+  ~ShillProvider() override {}
 
   // A variable returning whether we currently have network connectivity.
   virtual Variable<bool>* var_is_connected() = 0;
diff --git a/update_manager/system_provider.h b/update_manager/system_provider.h
index 8688b9c..ea5f79f 100644
--- a/update_manager/system_provider.h
+++ b/update_manager/system_provider.h
@@ -14,7 +14,7 @@
 // reported by crossystem, the kernel boot command line and the partition table.
 class SystemProvider : public Provider {
  public:
-  virtual ~SystemProvider() {}
+  ~SystemProvider() override {}
 
   // Returns true if the boot mode is normal or if it's unable to
   // determine the boot mode. Returns false if the boot mode is
diff --git a/update_manager/time_provider.h b/update_manager/time_provider.h
index 46fe65a..a30fdb3 100644
--- a/update_manager/time_provider.h
+++ b/update_manager/time_provider.h
@@ -15,7 +15,7 @@
 // Provider for time related information.
 class TimeProvider : public Provider {
  public:
-  virtual ~TimeProvider() {}
+  ~TimeProvider() override {}
 
   // Returns the current date. The time of day component will be zero.
   virtual Variable<base::Time>* var_curr_date() = 0;
diff --git a/update_manager/updater_provider.h b/update_manager/updater_provider.h
index 535b3e7..1ff1085 100644
--- a/update_manager/updater_provider.h
+++ b/update_manager/updater_provider.h
@@ -35,7 +35,7 @@
 // Provider for Chrome OS update related information.
 class UpdaterProvider : public Provider {
  public:
-  virtual ~UpdaterProvider() {}
+  ~UpdaterProvider() override {}
 
   // A variable returning the timestamp when the update engine was started in
   // wallclock time.
diff --git a/update_manager/variable.h b/update_manager/variable.h
index ad2eefa..c47f488 100644
--- a/update_manager/variable.h
+++ b/update_manager/variable.h
@@ -166,7 +166,7 @@
 template<typename T>
 class Variable : public BaseVariable {
  public:
-  virtual ~Variable() {}
+  ~Variable() override {}
 
  protected:
   // Only allow to get values through the EvaluationContext class and not
diff --git a/update_manager/variable_unittest.cc b/update_manager/variable_unittest.cc
index 7944c38..912d55c 100644
--- a/update_manager/variable_unittest.cc
+++ b/update_manager/variable_unittest.cc
@@ -25,7 +25,7 @@
       : Variable<T>(name, mode) {}
   DefaultVariable(const string& name, const TimeDelta& poll_interval)
       : Variable<T>(name, poll_interval) {}
-  virtual ~DefaultVariable() {}
+  ~DefaultVariable() override {}
 
  protected:
   virtual const T* GetValue(TimeDelta /* timeout */,