#include "services/network/public/cpp/cross_origin_opener_policy_parser.h"
#include <string_view>
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "net/http/http_response_headers.h"
#include "net/http/structured_headers.h"
#include "services/network/public/cpp/cross_origin_opener_policy.h"
#include "services/network/public/cpp/features.h"
namespace network {
namespace {
constexpr char kCrossOriginOpenerPolicyHeader[] = …;
constexpr char kCrossOriginOpenerPolicyHeaderReportOnly[] = …;
constexpr char kSameOrigin[] = …;
constexpr char kSameOriginAllowPopups[] = …;
constexpr char kRestrictProperties[] = …;
constexpr char kUnsafeNone[] = …;
constexpr char kReportTo[] = …;
constexpr char kNoopenerAllowPopups[] = …;
void ParseHeader(std::string_view header_value,
mojom::CrossOriginOpenerPolicyValue* value,
mojom::CrossOriginOpenerPolicyValue* soap_by_default_value,
std::optional<std::string>* endpoint) { … }
}
CrossOriginOpenerPolicy ParseCrossOriginOpenerPolicy(
const net::HttpResponseHeaders& headers) { … }
}