Add interactive override update restriction flags

Add the ability for an interactive update to provide its own set of
update restriction flags that are used instead of the normal set.

Bug: 66016687
Test: unit-tests, manual OTA

Change-Id: I7b80a0dadde6b163e8b5e2bc6fd197c2d7761646
(cherry picked from commit a6fbaa5323022080af2f711290e3fb953b9826a4)
diff --git a/common_service.cc b/common_service.cc
index 38a3096..370587b 100644
--- a/common_service.cc
+++ b/common_service.cc
@@ -88,16 +88,20 @@
 bool UpdateEngineService::AttemptUpdate(ErrorPtr* /* error */,
                                         const string& in_app_version,
                                         const string& in_omaha_url,
-                                        int32_t in_flags_as_int) {
+                                        int32_t in_flags_as_int,
+                                        bool* out_result) {
   auto flags = static_cast<UpdateAttemptFlags>(in_flags_as_int);
   bool interactive = !(flags & UpdateAttemptFlags::kFlagNonInteractive);
+  bool restrict_downloads = (flags & UpdateAttemptFlags::kFlagRestrictDownload);
 
   LOG(INFO) << "Attempt update: app_version=\"" << in_app_version << "\" "
             << "omaha_url=\"" << in_omaha_url << "\" "
             << "flags=0x" << std::hex << flags << " "
-            << "interactive=" << (interactive ? "yes" : "no");
-  system_state_->update_attempter()->CheckForUpdate(
-      in_app_version, in_omaha_url, interactive);
+            << "interactive=" << (interactive ? "yes " : "no ")
+            << "RestrictDownload=" << (restrict_downloads ? "yes " : "no ");
+
+  *out_result = system_state_->update_attempter()->CheckForUpdate(
+      in_app_version, in_omaha_url, flags);
   return true;
 }