update_engine: Relocate inference and storage of P2P related properties.

This change moves the inference of P2P related properties from
OmahaRequestAction to OmahaResponseHandlerAction, and their storage from
OmahaRequestParams to PayloadState. This is needed in order for the
UpdateCanStart policy to be able to decide P2P properties, which only
happens after the Omaha response is received and processed, and prior to
applying the update.  Further, P2P properties do not affect the Omaha
request, and so there's no reason for them to reside in
OmahaRequestParams nor decided as early as OmahaRequestAction.

Additional cleanup includes swapping expected/actual arguments to EXPECT
macros where appropriate, and removing redundant .Times(1) expectation
qualifiers.

BUG=chromium:384087
TEST=Unit tests.

Change-Id: I6d5b4b44745d5dab7e350bdf019dbf804bf196a1
Reviewed-on: https://chromium-review.googlesource.com/223618
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/payload_state_unittest.cc b/payload_state_unittest.cc
index cec69f1..9d73200 100644
--- a/payload_state_unittest.cc
+++ b/payload_state_unittest.cc
@@ -695,12 +695,12 @@
   EXPECT_EQ(1, payload_state.GetPayloadAttemptNumber());
   EXPECT_EQ(1, payload_state.GetFullPayloadAttemptNumber());
   // Set p2p url.
-  params.set_use_p2p_for_downloading(true);
-  params.set_p2p_url("http://mypeer:52909/path/to/file");
+  payload_state.SetUsingP2PForDownloading(true);
+  payload_state.SetP2PUrl("http://mypeer:52909/path/to/file");
   // Should not backoff for p2p updates.
   EXPECT_FALSE(payload_state.ShouldBackoffDownload());
 
-  params.set_p2p_url("");
+  payload_state.SetP2PUrl("");
   // No actual p2p update if no url is provided.
   EXPECT_TRUE(payload_state.ShouldBackoffDownload());
 }