1 // Copyright 2021 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "net/first_party_sets/same_party_context.h" 6 7 #include <ostream> 8 9 namespace net { 10 SamePartyContext(Type context_type)11SamePartyContext::SamePartyContext(Type context_type) 12 : context_type_(context_type) {} 13 operator ==(const SamePartyContext & other) const14bool SamePartyContext::operator==(const SamePartyContext& other) const { 15 return context_type_ == other.context_type_; 16 } 17 operator <<(std::ostream & os,const SamePartyContext & spc)18std::ostream& operator<<(std::ostream& os, const SamePartyContext& spc) { 19 os << "{" << static_cast<int>(spc.context_type()) << "}"; 20 return os; 21 } 22 23 // static MakeInclusive()24SamePartyContext SamePartyContext::MakeInclusive() { 25 return SamePartyContext(Type::kSameParty); 26 } 27 28 } // namespace net 29