Chromium Code Reviews| Index: content/common/service_worker/service_worker_provider_struct_traits.cc |
| diff --git a/content/common/service_worker/service_worker_provider_struct_traits.cc b/content/common/service_worker/service_worker_provider_struct_traits.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..39cbbeca00a52a9ebb8d2d2cea6bfb4dc3ca5a42 |
| --- /dev/null |
| +++ b/content/common/service_worker/service_worker_provider_struct_traits.cc |
| @@ -0,0 +1,24 @@ |
| +// 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 "content/common/service_worker/service_worker_provider_struct_traits.h" |
| +#include "content/common/service_worker/service_worker_types_struct_traits.h" |
| + |
| +namespace mojo { |
| + |
| +bool StructTraits<content::mojom::ServiceWorkerProviderHostInfoDataView, |
| + content::ServiceWorkerProviderHostInfo>:: |
| + Read(content::mojom::ServiceWorkerProviderHostInfoDataView in, |
| + content::ServiceWorkerProviderHostInfo* out) { |
| + content::ServiceWorkerProviderType type; |
| + if (!in.ReadType(&type)) |
| + return false; |
| + out->provider_id = in.provider_id(); |
| + out->route_id = in.route_id(); |
| + out->type = type; |
|
dcheng
2017/02/14 08:47:46
Nit: it'd be OK to just ReadType() directly into t
shimazu
2017/02/15 02:24:19
Done.
|
| + out->is_parent_frame_secure = in.is_parent_frame_secure(); |
| + return true; |
| +} |
| + |
| +} // namespace mojo |