platform2: sweep the lint errors identified by the updated linter

cpplint.py has been updated and identified new issues in existing
code. Stuff like overridden functions that specify 'override' should
not be marked as 'virtual', and constructors with no parameters
should not be marked as 'explicit'.

BUG=None
TEST=cpplint.py `find ./platform2 -name *.cc -or -name *.h`

Change-Id: Ibb9de43286d874d076ffd5ebb1b13c36ec794f01
Reviewed-on: https://chromium-review.googlesource.com/211950
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/update_manager/update_manager_unittest.cc b/update_manager/update_manager_unittest.cc
index cb9b61b..f6a1c01 100644
--- a/update_manager/update_manager_unittest.cc
+++ b/update_manager/update_manager_unittest.cc
@@ -58,7 +58,7 @@
 
 class UmUpdateManagerTest : public ::testing::Test {
  protected:
-  virtual void SetUp() {
+  void SetUp() override {
     fake_state_ = new FakeState();
     umut_.reset(new UpdateManager(&fake_clock_, TimeDelta::FromSeconds(5),
                                   TimeDelta::FromSeconds(1), fake_state_));
@@ -76,9 +76,9 @@
  public:
   explicit FailingPolicy(int* num_called_p) : num_called_p_(num_called_p) {}
   FailingPolicy() : FailingPolicy(nullptr) {}
-  virtual EvalStatus UpdateCheckAllowed(EvaluationContext* ec, State* state,
-                                        string* error,
-                                        UpdateCheckParams* result) const {
+  EvalStatus UpdateCheckAllowed(EvaluationContext* ec, State* state,
+                                string* error,
+                                UpdateCheckParams* result) const override {
     if (num_called_p_)
       (*num_called_p_)++;
     *error = "FailingPolicy failed.";
@@ -86,7 +86,7 @@
   }
 
  protected:
-  virtual std::string PolicyName() const override { return "FailingPolicy"; }
+  std::string PolicyName() const override { return "FailingPolicy"; }
 
  private:
   int* num_called_p_;
@@ -94,14 +94,14 @@
 
 // The LazyPolicy always returns EvalStatus::kAskMeAgainLater.
 class LazyPolicy : public DefaultPolicy {
-  virtual EvalStatus UpdateCheckAllowed(EvaluationContext* ec, State* state,
-                                        string* error,
-                                        UpdateCheckParams* result) const {
+  EvalStatus UpdateCheckAllowed(EvaluationContext* ec, State* state,
+                                string* error,
+                                UpdateCheckParams* result) const override {
     return EvalStatus::kAskMeAgainLater;
   }
 
  protected:
-  virtual std::string PolicyName() const override { return "LazyPolicy"; }
+  std::string PolicyName() const override { return "LazyPolicy"; }
 };
 
 // A policy that sleeps for a predetermined amount of time, then checks for a
@@ -114,9 +114,9 @@
   DelayPolicy(int sleep_secs, Time time_threshold, int* num_called_p)
       : sleep_secs_(sleep_secs), time_threshold_(time_threshold),
         num_called_p_(num_called_p) {}
-  virtual EvalStatus UpdateCheckAllowed(EvaluationContext* ec, State* state,
-                                        string* error,
-                                        UpdateCheckParams* result) const {
+  EvalStatus UpdateCheckAllowed(EvaluationContext* ec, State* state,
+                                string* error,
+                                UpdateCheckParams* result) const override {
     if (num_called_p_)
       (*num_called_p_)++;
 
@@ -134,7 +134,7 @@
   }
 
  protected:
-  virtual std::string PolicyName() const override { return "DelayPolicy"; }
+  std::string PolicyName() const override { return "DelayPolicy"; }
 
  private:
   int sleep_secs_;