Provide a repeating callback for UpdateClient::{Install,Update}

This is mechanical change for the component updater, because the
component updater gets state change notifications using the observer
interface of update client.

//chrome/updater code is not changed in the CL but the in the future,
a valid CrxStateChangeCallback is going to be provided when invoking
UpdateClient::{Install,Update}.


Bug: 1058858
Change-Id: Iba086a5b7a6e955125de4b5b114d6010c8526c55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2092422
Commit-Queue: Sorin Jianu <[email protected]>
Reviewed-by: Joshua Pawlicki <[email protected]>
Cr-Commit-Position: refs/heads/master@{#748517}
diff --git a/components/component_updater/component_updater_service_unittest.cc b/components/component_updater/component_updater_service_unittest.cc
index 02bfcc232..a376c30 100644
--- a/components/component_updater/component_updater_service_unittest.cc
+++ b/components/component_updater/component_updater_service_unittest.cc
@@ -78,6 +78,7 @@
   // move semantics. This function is a shim to work around it.
   void Install(const std::string& id,
                CrxDataCallback crx_data_callback,
+               CrxStateChangeCallback crx_state_change_callback,
                Callback callback) override {
     DoInstall(id);
     std::move(callback).Run(update_client::Error::NONE);
@@ -85,6 +86,7 @@
 
   void Update(const std::vector<std::string>& ids,
               CrxDataCallback crx_data_callback,
+              CrxStateChangeCallback crx_state_change_callback,
               bool is_foreground,
               Callback callback) override {
     // All update calls initiated by the component update service are
@@ -142,10 +144,6 @@
   ComponentUpdaterTest();
   ~ComponentUpdaterTest() override;
 
-  void SetUp() override;
-
-  void TearDown() override;
-
   // Makes the full path to a component updater test file.
   const base::FilePath test_file(const char* file);
 
@@ -192,23 +190,12 @@
   update_client::Error error_ = update_client::Error::NONE;
 };
 
-MockInstaller::MockInstaller() {
-}
-
-MockInstaller::~MockInstaller() {
-}
-
-MockUpdateClient::MockUpdateClient() {
-}
-
-MockUpdateClient::~MockUpdateClient() {
-}
-
-MockServiceObserver::MockServiceObserver() {
-}
-
-MockServiceObserver::~MockServiceObserver() {
-}
+MockInstaller::MockInstaller() = default;
+MockInstaller::~MockInstaller() = default;
+MockUpdateClient::MockUpdateClient() = default;
+MockUpdateClient::~MockUpdateClient() = default;
+MockServiceObserver::MockServiceObserver() = default;
+MockServiceObserver::~MockServiceObserver() = default;
 
 void OnDemandTester::OnDemand(ComponentUpdateService* cus,
                               const std::string& id,
@@ -246,12 +233,6 @@
   component_updater_.reset();
 }
 
-void ComponentUpdaterTest::SetUp() {
-}
-
-void ComponentUpdaterTest::TearDown() {
-}
-
 void ComponentUpdaterTest::RunThreads() {
   runloop_.Run();
 }