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/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();