Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Side by Side Diff: extensions/common/manifest_parser_struct_traits.cc

Issue 2699663003: Convert utility process extension ParseUpdate IPC to mojo (Closed)
Patch Set: Sync to ToT, see if git apply issue and try jobs are happy. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/common/manifest_parser_struct_traits.h ('k') | extensions/common/typemaps.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "extensions/common/manifest_parser_struct_traits.h"
6 #include "url/mojo/url_gurl_struct_traits.h"
7
8 namespace mojo {
9
10 // static
11 bool StructTraits<::extensions::mojom::UpdateManifestResults::DataView,
12 ::UpdateManifest::Results>::
13 Read(::extensions::mojom::UpdateManifestResults::DataView input,
14 ::UpdateManifest::Results* output) {
15 if (!input.ReadList(&output->list))
16 return false;
17 output->daystart_elapsed_seconds = input.daystart_elapsed_seconds();
18 return true;
19 }
20
21 // static
22 bool StructTraits<::extensions::mojom::UpdateManifestResult::DataView,
23 ::UpdateManifest::Result>::
24 Read(::extensions::mojom::UpdateManifestResult::DataView input,
25 ::UpdateManifest::Result* output) {
26 if (!input.ReadExtensionId(&output->extension_id))
27 return false;
28 if (!input.ReadVersion(&output->version))
29 return false;
30 if (!input.ReadBrowserMinVersion(&output->browser_min_version))
31 return false;
32 if (!input.ReadCrxUrl(&output->crx_url))
33 return false;
34 if (!input.ReadPackageHash(&output->package_hash))
35 return false;
36 output->size = input.size();
37 if (!input.ReadPackageFingerprint(&output->package_fingerprint))
38 return false;
39 if (!input.ReadDiffCrxUrl(&output->diff_crx_url))
40 return false;
41 if (!input.ReadDiffPackageHash(&output->diff_package_hash))
42 return false;
43 output->diff_size = input.diff_size();
44 return true;
45 }
46
47 } // namespace mojo
OLDNEW
« no previous file with comments | « extensions/common/manifest_parser_struct_traits.h ('k') | extensions/common/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698