Implement Omaha 3.1 Protocol Upgrade.

This implements the section related to 'manifest objects' in the Omaha
protocol:
https://cs.chromium.org/chromium/src/docs/updater/protocol_3_1.md

```
A manifest object contains details about how to fetch and apply an
update.
*`arguments`: A string, indicating command-line arguments that should
be passed to the binary specified in `run`. Default: "".
*`run`: A path within the CRX archive to an executable to run as part
of the update. The executable is typically an application installer.
If unsent or the empty string, no particular update-delivered
installer needs to be run. Default: "" (empty string).
```

Such values are being parsed and passed over as an optional parameter
to the CrxInstaller::Install call. An std::unique_ptr is used to
avoid forcing all callers of CrxInstaller::Install to use the
base::Optional type.

The //chrome/updater code picks up this parameter and, on Windows,
it runs the program specified by the update response. The other
platforms don't implement this call yet but code will land soon
for macOS.

This change is transparent for the component and extensions updaters
since their installers ignore these optional parameters.
A compliant server would not respond with {run, arguments} for
these update_client requests.

Bug: 1042218
Change-Id: I00368182d0aa1189893808c1b6972284c5b3407e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036287
Reviewed-by: Joshua Pawlicki <[email protected]>
Reviewed-by: Julian Pastarmov <[email protected]>
Commit-Queue: Sorin Jianu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#738633}
diff --git a/components/update_client/update_client.h b/components/update_client/update_client.h
index d88837b..c50ca2b 100644
--- a/components/update_client/update_client.h
+++ b/components/update_client/update_client.h
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -176,6 +177,12 @@
     int extended_error = 0;
   };
 
+  struct InstallParams {
+    InstallParams(const std::string& run, const std::string& arguments);
+    std::string run;
+    std::string arguments;
+  };
+
   using Callback = base::OnceCallback<void(const Result& result)>;
 
   // Called on the main thread when there was a problem unpacking or
@@ -187,10 +194,15 @@
   // and it is ready to be installed. |unpack_path| contains the
   // temporary directory with all the unpacked CRX files. |pubkey| contains the
   // public key of the CRX in the PEM format, without the header and the footer.
+  // |install_params| is an optional parameter which provides the name and
+  // the arguments for a binary program which is invoked as part of the
+  // install or update flows. To avoid forcing the callers to depend on
+  // base::Optional, an std::unique_ptr type is used.
   // The caller must invoke the |callback| when the install flow has completed.
   // This method may be called from a thread other than the main thread.
   virtual void Install(const base::FilePath& unpack_path,
                        const std::string& public_key,
+                       std::unique_ptr<InstallParams> install_params,
                        Callback callback) = 0;
 
   // Sets |installed_file| to the full path to the installed |file|. |file| is