1 // Copyright 2020 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 #ifndef SERVICES_NETWORK_PUBLIC_CPP_CROSS_ORIGIN_EMBEDDER_POLICY_H_ 6 #define SERVICES_NETWORK_PUBLIC_CPP_CROSS_ORIGIN_EMBEDDER_POLICY_H_ 7 8 #include <string> 9 10 #include "base/component_export.h" 11 #include "services/network/public/mojom/cross_origin_embedder_policy.mojom-shared.h" 12 13 namespace network { 14 15 // This corresponds to network::mojom::CrossOriginEmbedderPolicy. 16 // See the comments there. COMPONENT_EXPORT(NETWORK_CPP_BASE)17struct COMPONENT_EXPORT(NETWORK_CPP_BASE) CrossOriginEmbedderPolicy final { 18 CrossOriginEmbedderPolicy(); 19 ~CrossOriginEmbedderPolicy(); 20 CrossOriginEmbedderPolicy(const CrossOriginEmbedderPolicy&); 21 CrossOriginEmbedderPolicy(CrossOriginEmbedderPolicy&&); 22 CrossOriginEmbedderPolicy& operator=(const CrossOriginEmbedderPolicy&); 23 CrossOriginEmbedderPolicy& operator=(CrossOriginEmbedderPolicy&&); 24 bool operator==(const CrossOriginEmbedderPolicy&) const; 25 26 mojom::CrossOriginEmbedderPolicyValue value = 27 mojom::CrossOriginEmbedderPolicyValue::kNone; 28 base::Optional<std::string> reporting_endpoint; 29 mojom::CrossOriginEmbedderPolicyValue report_only_value = 30 mojom::CrossOriginEmbedderPolicyValue::kNone; 31 base::Optional<std::string> report_only_reporting_endpoint; 32 }; 33 34 } // namespace network 35 36 #endif // SERVICES_NETWORK_PUBLIC_CPP_CROSS_ORIGIN_EMBEDDER_POLICY_H_ 37