AU: add an interactive flag to Omaha requests

Such a flag can be used to distinguish between user-initiated
(interactive) checks and those that are due to background scheduling. In
the former case, we may want to suppress the probabilistic throttling
that's commonly used with latest releases. This CL piggybacks the new
functionality on top of an existing dataflow used for distinguishing
between interactive / scheduled checks, only it pushes it further so it
is evident in the Omaha request as well.

Comes with a unit test for ensuring that the Omaha flag is set as
expected.

BUG=chromium-os:26594
TEST=Dbus initiated checks correctly tainted

Change-Id: Ia2b3ff5ce3a866c64e453557028b8cbd92c1a258
Reviewed-on: https://gerrit.chromium.org/gerrit/41081
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/omaha_request_params.h b/omaha_request_params.h
index ea8bab0..f38978c 100644
--- a/omaha_request_params.h
+++ b/omaha_request_params.h
@@ -31,6 +31,7 @@
         os_version(kOsVersion),
         app_id(kAppId),
         delta_okay(true),
+        interactive(false),
         update_disabled(false),
         wall_clock_based_wait_enabled(false),
         update_check_count_wait_enabled(false),
@@ -47,6 +48,7 @@
                      const std::string& in_app_track,
                      const std::string& in_hardware_class,
                      bool in_delta_okay,
+                     bool in_interactive,
                      const std::string& in_update_url,
                      bool in_update_disabled,
                      const std::string& in_target_version_prefix)
@@ -60,6 +62,7 @@
         app_track(in_app_track),
         hardware_class(in_hardware_class),
         delta_okay(in_delta_okay),
+        interactive(in_interactive),
         update_url(in_update_url),
         update_disabled(in_update_disabled),
         target_version_prefix(in_target_version_prefix),
@@ -78,6 +81,7 @@
   std::string app_track;
   std::string hardware_class;  // Hardware Qualification ID of the client
   bool delta_okay;  // If this client can accept a delta
+  bool interactive;   // Whether this is a user-initiated update check
 
   std::string update_url;
 
@@ -111,7 +115,8 @@
   // of the parameter. Returns true on success, false otherwise.
   bool Init(const std::string& in_app_version,
             const std::string& in_update_url,
-            const std::string& in_release_track);
+            const std::string& in_release_track,
+            bool in_interactive);
 
   // Permanently changes the release track to |track|. Returns true on success,
   // false otherwise.