Always powerwash on channel change if arbitrary channel allowed.

Merged is_powerwash_allowed() and to_more_stable_channel() into
ShouldPowerwash().

Bug: 73082835
Test: update_engine_unittests
Change-Id: I6b7af0d1dac28d5fa9cddf4391bbd9cdf2acb57b
diff --git a/mock_omaha_request_params.h b/mock_omaha_request_params.h
index 5d5d47b..6d8d3d8 100644
--- a/mock_omaha_request_params.h
+++ b/mock_omaha_request_params.h
@@ -32,9 +32,6 @@
     // Delegate all calls to the parent instance by default. This helps the
     // migration from tests using the real RequestParams when they should have
     // use a fake or mock.
-    ON_CALL(*this, to_more_stable_channel())
-        .WillByDefault(testing::Invoke(
-            this, &MockOmahaRequestParams::fake_to_more_stable_channel));
     ON_CALL(*this, GetAppId())
         .WillByDefault(testing::Invoke(
             this, &MockOmahaRequestParams::FakeGetAppId));
@@ -44,27 +41,22 @@
     ON_CALL(*this, UpdateDownloadChannel())
         .WillByDefault(testing::Invoke(
             this, &MockOmahaRequestParams::FakeUpdateDownloadChannel));
-    ON_CALL(*this, is_powerwash_allowed())
+    ON_CALL(*this, ShouldPowerwash())
         .WillByDefault(testing::Invoke(
-            this, &MockOmahaRequestParams::fake_is_powerwash_allowed));
+            this, &MockOmahaRequestParams::FakeShouldPowerwash));
   }
 
-  MOCK_CONST_METHOD0(to_more_stable_channel, bool(void));
   MOCK_CONST_METHOD0(GetAppId, std::string(void));
   MOCK_METHOD3(SetTargetChannel, bool(const std::string& channel,
                                       bool is_powerwash_allowed,
                                       std::string* error));
   MOCK_METHOD0(UpdateDownloadChannel, void(void));
-  MOCK_CONST_METHOD0(is_powerwash_allowed, bool(void));
   MOCK_CONST_METHOD0(IsUpdateUrlOfficial, bool(void));
+  MOCK_CONST_METHOD0(ShouldPowerwash, bool(void));
 
  private:
   // Wrappers to call the parent class and behave like the real object by
   // default. See "Delegating Calls to a Parent Class" in gmock's documentation.
-  bool fake_to_more_stable_channel() const {
-    return OmahaRequestParams::to_more_stable_channel();
-  }
-
   std::string FakeGetAppId() const {
     return OmahaRequestParams::GetAppId();
   }
@@ -81,8 +73,8 @@
     return OmahaRequestParams::UpdateDownloadChannel();
   }
 
-  bool fake_is_powerwash_allowed() const {
-    return OmahaRequestParams::is_powerwash_allowed();
+  bool FakeShouldPowerwash() const {
+    return OmahaRequestParams::ShouldPowerwash();
   }
 };