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

Unified Diff: content/public/common/resource_type_enum_traits.h

Issue 2900563002: Network service: Safe browsing check for sub-resources from renderer. (Closed)
Patch Set: . Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/public/common/resource_type_enum_traits.h
diff --git a/content/public/common/resource_type_enum_traits.h b/content/public/common/resource_type_enum_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..e458c65ead708f75feb61dbbcd858430431b2366
--- /dev/null
+++ b/content/public/common/resource_type_enum_traits.h
@@ -0,0 +1,22 @@
+// 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.
+
+#ifndef CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_ENUM_TRAITS_H_
+#define CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_ENUM_TRAITS_H_
+
+#include "content/public/common/resource_type.h"
+#include "content/public/common/resource_type.mojom-shared.h"
+#include "mojo/public/cpp/bindings/enum_traits.h"
+
+namespace mojo {
+
+template <>
+struct EnumTraits<content::mojom::ResourceType, content::ResourceType> {
+ static content::mojom::ResourceType ToMojom(content::ResourceType input);
+ static bool FromMojom(content::mojom::ResourceType input,
+ content::ResourceType* output);
+};
+}
+
+#endif // CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_ENUM_TRAITS_H_

Powered by Google App Engine
This is Rietveld 408576698