Don't backoff update attempts for interactive checks.

Previous CL only did not defer where deferring is Policy driven while
backoff is state driven. This CL also moves the matching p2p logic
into ShouldBackoffDownload which makes it easier to see and test.

BUG=chromium:274056
TEST=New unittests.

Change-Id: I3acd29c0cf11d855cfd78f77016857f52a6d346c
Reviewed-on: https://chromium-review.googlesource.com/168290
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
diff --git a/payload_state.cc b/payload_state.cc
index 90dc3d3..162848a 100644
--- a/payload_state.cc
+++ b/payload_state.cc
@@ -295,7 +295,16 @@
                  "Can proceed with the download";
     return false;
   }
-
+  if (system_state_->request_params()->use_p2p_for_downloading() &&
+      !system_state_->request_params()->p2p_url().empty()) {
+    LOG(INFO) << "Payload backoff logic is disabled because download "
+              << "will happen from local peer (via p2p).";
+    return false;
+  }
+  if (system_state_->request_params()->interactive()) {
+    LOG(INFO) << "Payload backoff disabled for interactive update checks.";
+    return false;
+  }
   if (response_.is_delta_payload) {
     // If delta payloads fail, we want to fallback quickly to full payloads as
     // they are more likely to succeed. Exponential backoffs would greatly