summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/common/manifest
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/common/manifest')
-rw-r--r--chromium/third_party/blink/common/manifest/manifest.cc3
-rw-r--r--chromium/third_party/blink/common/manifest/manifest_mojom_traits.cc16
2 files changed, 18 insertions, 1 deletions
diff --git a/chromium/third_party/blink/common/manifest/manifest.cc b/chromium/third_party/blink/common/manifest/manifest.cc
index 942311867cf..1d2db2b8b70 100644
--- a/chromium/third_party/blink/common/manifest/manifest.cc
+++ b/chromium/third_party/blink/common/manifest/manifest.cc
@@ -49,7 +49,8 @@ bool Manifest::IsEmpty() const {
icons.empty() && shortcuts.empty() && !share_target.has_value() &&
related_applications.empty() && file_handlers.empty() &&
!prefer_related_applications && !theme_color && !background_color &&
- gcm_sender_id.is_null() && scope.is_empty();
+ gcm_sender_id.is_null() && scope.is_empty() &&
+ protocol_handlers.empty();
}
} // namespace blink
diff --git a/chromium/third_party/blink/common/manifest/manifest_mojom_traits.cc b/chromium/third_party/blink/common/manifest/manifest_mojom_traits.cc
index 91878c1eea7..f345be0bdc7 100644
--- a/chromium/third_party/blink/common/manifest/manifest_mojom_traits.cc
+++ b/chromium/third_party/blink/common/manifest/manifest_mojom_traits.cc
@@ -75,6 +75,9 @@ bool StructTraits<blink::mojom::ManifestDataView, ::blink::Manifest>::Read(
if (!data.ReadFileHandlers(&out->file_handlers))
return false;
+ if (!data.ReadProtocolHandlers(&out->protocol_handlers))
+ return false;
+
if (!data.ReadRelatedApplications(&out->related_applications))
return false;
@@ -241,4 +244,17 @@ bool StructTraits<blink::mojom::ManifestFileHandlerDataView,
return true;
}
+bool StructTraits<blink::mojom::ManifestProtocolHandlerDataView,
+ ::blink::Manifest::ProtocolHandler>::
+ Read(blink::mojom::ManifestProtocolHandlerDataView data,
+ ::blink::Manifest::ProtocolHandler* out) {
+ if (!data.ReadProtocol(&out->protocol))
+ return false;
+
+ if (!data.ReadUrl(&out->url))
+ return false;
+
+ return true;
+}
+
} // namespace mojo