Convert utility process extension ParseUpdate IPC to mojo

Add ManifestParser mojo, used to parse an extensions update XML
manifest document, and expose it to the browser via the utility
process policy file. Change the caller to use a utility process
mojo client. Add mojo structure traits to handle the API return
values UpdateManifest::{Results,Result}. Remove the IPC message
file: no longer needed or used.

Covered by tests: ExtensionManagementTest.ExternalUrlUpdate and
ExtensionManagementTest.AutoUpdate and others. Refer to [1] for
a complete list.

[1] https://codereview.chromium.org/2761763002

BUG=691410

Review-Url: https://codereview.chromium.org/2699663003
Cr-Commit-Position: refs/heads/master@{#460280}
diff --git a/extensions/common/manifest_parser_struct_traits.cc b/extensions/common/manifest_parser_struct_traits.cc
new file mode 100644
index 0000000..ddce9a53
--- /dev/null
+++ b/extensions/common/manifest_parser_struct_traits.cc
@@ -0,0 +1,47 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/common/manifest_parser_struct_traits.h"
+#include "url/mojo/url_gurl_struct_traits.h"
+
+namespace mojo {
+
+// static
+bool StructTraits<::extensions::mojom::UpdateManifestResults::DataView,
+                  ::UpdateManifest::Results>::
+    Read(::extensions::mojom::UpdateManifestResults::DataView input,
+         ::UpdateManifest::Results* output) {
+  if (!input.ReadList(&output->list))
+    return false;
+  output->daystart_elapsed_seconds = input.daystart_elapsed_seconds();
+  return true;
+}
+
+// static
+bool StructTraits<::extensions::mojom::UpdateManifestResult::DataView,
+                  ::UpdateManifest::Result>::
+    Read(::extensions::mojom::UpdateManifestResult::DataView input,
+         ::UpdateManifest::Result* output) {
+  if (!input.ReadExtensionId(&output->extension_id))
+    return false;
+  if (!input.ReadVersion(&output->version))
+    return false;
+  if (!input.ReadBrowserMinVersion(&output->browser_min_version))
+    return false;
+  if (!input.ReadCrxUrl(&output->crx_url))
+    return false;
+  if (!input.ReadPackageHash(&output->package_hash))
+    return false;
+  output->size = input.size();
+  if (!input.ReadPackageFingerprint(&output->package_fingerprint))
+    return false;
+  if (!input.ReadDiffCrxUrl(&output->diff_crx_url))
+    return false;
+  if (!input.ReadDiffPackageHash(&output->diff_package_hash))
+    return false;
+  output->diff_size = input.diff_size();
+  return true;
+}
+
+}  // namespace mojo