tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 0f6a2580fc93897abaa41497fe6428b371999cb7
parent d2fd7b2f110d1856768147e095a7755d2b6d442b
Author: Mark Banner <standard8@mozilla.com>
Date:   Thu, 13 Nov 2025 15:41:30 +0000

Bug 1999646 - Remove the nsCookieBannerTelemetryService. r=timhuang

Differential Revision: https://phabricator.services.mozilla.com/D272238

Diffstat:
Mtoolkit/components/cookiebanners/components.conf | 13-------------
Dtoolkit/components/cookiebanners/cookieBanner.pb.cc | 983-------------------------------------------------------------------------------
Dtoolkit/components/cookiebanners/cookieBanner.pb.h | 1058-------------------------------------------------------------------------------
Dtoolkit/components/cookiebanners/cookieBanner.proto | 25-------------------------
Mtoolkit/components/cookiebanners/metrics.yaml | 65-----------------------------------------------------------------
Mtoolkit/components/cookiebanners/moz.build | 7-------
Dtoolkit/components/cookiebanners/nsCookieBannerTelemetryService.cpp | 389-------------------------------------------------------------------------------
Dtoolkit/components/cookiebanners/nsCookieBannerTelemetryService.h | 47-----------------------------------------------
Dtoolkit/components/cookiebanners/nsICookieBannerTelemetryService.idl | 13-------------
Mtoolkit/components/cookiebanners/test/browser/browser.toml | 2--
Dtoolkit/components/cookiebanners/test/browser/browser_cookiebanner_gdpr_telemetry.js | 189-------------------------------------------------------------------------------
Mtoolkit/components/protobuf/scripts/generate_files.py | 5-----
Mtools/@types/generated/lib.gecko.dom.d.ts | 10+++++++++-
Mtools/@types/generated/lib.gecko.glean.d.ts | 11+++++++----
Mtools/@types/generated/lib.gecko.xpcom.d.ts | 28+++++++++++++++++-----------
15 files changed, 33 insertions(+), 2812 deletions(-)

diff --git a/toolkit/components/cookiebanners/components.conf b/toolkit/components/cookiebanners/components.conf @@ -36,17 +36,4 @@ Classes = [ 'constructor': 'CookieBannerListService', 'processes': ProcessSelector.MAIN_PROCESS_ONLY, }, - { - 'cid': '{56197e18-d144-45b5-9f77-84102f064462}', - 'interfaces': ['nsICookieBannerTelemetryService'], - 'headers': ['/toolkit/components/cookiebanners/nsCookieBannerTelemetryService.h'], - 'contract_ids': ['@mozilla.org/cookie-banner-telemetry-service;1'], - 'type': 'mozilla::nsCookieBannerTelemetryService', - 'singleton': True, - 'constructor': 'mozilla::nsCookieBannerTelemetryService::GetSingleton', - 'categories': { - 'profile-after-change': 'nsCookieBannerTelemetryService', - }, - 'processes': ProcessSelector.MAIN_PROCESS_ONLY, - }, ] diff --git a/toolkit/components/cookiebanners/cookieBanner.pb.cc b/toolkit/components/cookiebanners/cookieBanner.pb.cc @@ -1,983 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: cookieBanner.proto - -#include "cookieBanner.pb.h" - -#include <algorithm> - -#include <google/protobuf/io/coded_stream.h> -#include <google/protobuf/extension_set.h> -#include <google/protobuf/wire_format_lite.h> -#include <google/protobuf/io/zero_copy_stream_impl_lite.h> -// @@protoc_insertion_point(includes) -#include <google/protobuf/port_def.inc> - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace mozilla { -namespace cookieBanner { -PROTOBUF_CONSTEXPR GoogleSOCSCookie_extraData::GoogleSOCSCookie_extraData( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.platform_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.unused1_)*/0u - , /*decltype(_impl_.unused2_)*/0u} {} -struct GoogleSOCSCookie_extraDataDefaultTypeInternal { - PROTOBUF_CONSTEXPR GoogleSOCSCookie_extraDataDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~GoogleSOCSCookie_extraDataDefaultTypeInternal() {} - union { - GoogleSOCSCookie_extraData _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GoogleSOCSCookie_extraDataDefaultTypeInternal _GoogleSOCSCookie_extraData_default_instance_; -PROTOBUF_CONSTEXPR GoogleSOCSCookie_timeData::GoogleSOCSCookie_timeData( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.timestamp_)*/uint64_t{0u}} {} -struct GoogleSOCSCookie_timeDataDefaultTypeInternal { - PROTOBUF_CONSTEXPR GoogleSOCSCookie_timeDataDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~GoogleSOCSCookie_timeDataDefaultTypeInternal() {} - union { - GoogleSOCSCookie_timeData _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GoogleSOCSCookie_timeDataDefaultTypeInternal _GoogleSOCSCookie_timeData_default_instance_; -PROTOBUF_CONSTEXPR GoogleSOCSCookie::GoogleSOCSCookie( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.data_)*/nullptr - , /*decltype(_impl_.time_)*/nullptr - , /*decltype(_impl_.gdpr_choice_)*/0u} {} -struct GoogleSOCSCookieDefaultTypeInternal { - PROTOBUF_CONSTEXPR GoogleSOCSCookieDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~GoogleSOCSCookieDefaultTypeInternal() {} - union { - GoogleSOCSCookie _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GoogleSOCSCookieDefaultTypeInternal _GoogleSOCSCookie_default_instance_; -} // namespace cookieBanner -} // namespace mozilla -namespace mozilla { -namespace cookieBanner { - -// =================================================================== - -class GoogleSOCSCookie_extraData::_Internal { - public: - using HasBits = decltype(std::declval<GoogleSOCSCookie_extraData>()._impl_._has_bits_); - static void set_has_unused1(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_platform(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_region(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_unused2(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static bool MissingRequiredFields(const HasBits& has_bits) { - return ((has_bits[0] & 0x0000000f) ^ 0x0000000f) != 0; - } -}; - -GoogleSOCSCookie_extraData::GoogleSOCSCookie_extraData(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:mozilla.cookieBanner.GoogleSOCSCookie.extraData) -} -GoogleSOCSCookie_extraData::GoogleSOCSCookie_extraData(const GoogleSOCSCookie_extraData& from) - : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - GoogleSOCSCookie_extraData* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.platform_){} - , decltype(_impl_.region_){} - , decltype(_impl_.unused1_){} - , decltype(_impl_.unused2_){}}; - - _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); - _impl_.platform_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.platform_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_platform()) { - _this->_impl_.platform_.Set(from._internal_platform(), - _this->GetArenaForAllocation()); - } - _impl_.region_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_region()) { - _this->_impl_.region_.Set(from._internal_region(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.unused1_, &from._impl_.unused1_, - static_cast<size_t>(reinterpret_cast<char*>(&_impl_.unused2_) - - reinterpret_cast<char*>(&_impl_.unused1_)) + sizeof(_impl_.unused2_)); - // @@protoc_insertion_point(copy_constructor:mozilla.cookieBanner.GoogleSOCSCookie.extraData) -} - -inline void GoogleSOCSCookie_extraData::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.platform_){} - , decltype(_impl_.region_){} - , decltype(_impl_.unused1_){0u} - , decltype(_impl_.unused2_){0u} - }; - _impl_.platform_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.platform_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -GoogleSOCSCookie_extraData::~GoogleSOCSCookie_extraData() { - // @@protoc_insertion_point(destructor:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void GoogleSOCSCookie_extraData::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.platform_.Destroy(); - _impl_.region_.Destroy(); -} - -void GoogleSOCSCookie_extraData::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void GoogleSOCSCookie_extraData::Clear() { -// @@protoc_insertion_point(message_clear_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _impl_.platform_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.region_.ClearNonDefaultToEmpty(); - } - } - if (cached_has_bits & 0x0000000cu) { - ::memset(&_impl_.unused1_, 0, static_cast<size_t>( - reinterpret_cast<char*>(&_impl_.unused2_) - - reinterpret_cast<char*>(&_impl_.unused1_)) + sizeof(_impl_.unused2_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<std::string>(); -} - -const char* GoogleSOCSCookie_extraData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // required uint32 unused1 = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { - _Internal::set_has_unused1(&has_bits); - _impl_.unused1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // required string platform = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { - auto str = _internal_mutable_platform(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // required string region = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { - auto str = _internal_mutable_region(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // required uint32 unused2 = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { - _Internal::set_has_unused2(&has_bits); - _impl_.unused2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<std::string>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* GoogleSOCSCookie_extraData::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // required uint32 unused1 = 1; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_unused1(), target); - } - - // required string platform = 2; - if (cached_has_bits & 0x00000001u) { - target = stream->WriteStringMaybeAliased( - 2, this->_internal_platform(), target); - } - - // required string region = 3; - if (cached_has_bits & 0x00000002u) { - target = stream->WriteStringMaybeAliased( - 3, this->_internal_region(), target); - } - - // required uint32 unused2 = 4; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_unused2(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), - static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); - } - // @@protoc_insertion_point(serialize_to_array_end:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - return target; -} - -size_t GoogleSOCSCookie_extraData::RequiredFieldsByteSizeFallback() const { -// @@protoc_insertion_point(required_fields_byte_size_fallback_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - size_t total_size = 0; - - if (_internal_has_platform()) { - // required string platform = 2; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_platform()); - } - - if (_internal_has_region()) { - // required string region = 3; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_region()); - } - - if (_internal_has_unused1()) { - // required uint32 unused1 = 1; - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused1()); - } - - if (_internal_has_unused2()) { - // required uint32 unused2 = 4; - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused2()); - } - - return total_size; -} -size_t GoogleSOCSCookie_extraData::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - size_t total_size = 0; - - if (((_impl_._has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) { // All required fields are present. - // required string platform = 2; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_platform()); - - // required string region = 3; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_region()); - - // required uint32 unused1 = 1; - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused1()); - - // required uint32 unused2 = 4; - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused2()); - - } else { - total_size += RequiredFieldsByteSizeFallback(); - } - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); - } - int cached_size = ::_pbi::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GoogleSOCSCookie_extraData::CheckTypeAndMergeFrom( - const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast<const GoogleSOCSCookie_extraData*>( - &from)); -} - -void GoogleSOCSCookie_extraData::MergeFrom(const GoogleSOCSCookie_extraData& from) { - GoogleSOCSCookie_extraData* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_set_platform(from._internal_platform()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_set_region(from._internal_region()); - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.unused1_ = from._impl_.unused1_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.unused2_ = from._impl_.unused2_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); -} - -void GoogleSOCSCookie_extraData::CopyFrom(const GoogleSOCSCookie_extraData& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GoogleSOCSCookie_extraData::IsInitialized() const { - if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; - return true; -} - -void GoogleSOCSCookie_extraData::InternalSwap(GoogleSOCSCookie_extraData* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.platform_, lhs_arena, - &other->_impl_.platform_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.region_, lhs_arena, - &other->_impl_.region_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie_extraData, _impl_.unused2_) - + sizeof(GoogleSOCSCookie_extraData::_impl_.unused2_) - - PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie_extraData, _impl_.unused1_)>( - reinterpret_cast<char*>(&_impl_.unused1_), - reinterpret_cast<char*>(&other->_impl_.unused1_)); -} - -std::string GoogleSOCSCookie_extraData::GetTypeName() const { - return "mozilla.cookieBanner.GoogleSOCSCookie.extraData"; -} - - -// =================================================================== - -class GoogleSOCSCookie_timeData::_Internal { - public: - using HasBits = decltype(std::declval<GoogleSOCSCookie_timeData>()._impl_._has_bits_); - static void set_has_timestamp(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static bool MissingRequiredFields(const HasBits& has_bits) { - return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; - } -}; - -GoogleSOCSCookie_timeData::GoogleSOCSCookie_timeData(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:mozilla.cookieBanner.GoogleSOCSCookie.timeData) -} -GoogleSOCSCookie_timeData::GoogleSOCSCookie_timeData(const GoogleSOCSCookie_timeData& from) - : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - GoogleSOCSCookie_timeData* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.timestamp_){}}; - - _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); - _this->_impl_.timestamp_ = from._impl_.timestamp_; - // @@protoc_insertion_point(copy_constructor:mozilla.cookieBanner.GoogleSOCSCookie.timeData) -} - -inline void GoogleSOCSCookie_timeData::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.timestamp_){uint64_t{0u}} - }; -} - -GoogleSOCSCookie_timeData::~GoogleSOCSCookie_timeData() { - // @@protoc_insertion_point(destructor:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void GoogleSOCSCookie_timeData::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void GoogleSOCSCookie_timeData::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void GoogleSOCSCookie_timeData::Clear() { -// @@protoc_insertion_point(message_clear_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.timestamp_ = uint64_t{0u}; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<std::string>(); -} - -const char* GoogleSOCSCookie_timeData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // required uint64 timeStamp = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { - _Internal::set_has_timestamp(&has_bits); - _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<std::string>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* GoogleSOCSCookie_timeData::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // required uint64 timeStamp = 1; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_timestamp(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), - static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); - } - // @@protoc_insertion_point(serialize_to_array_end:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - return target; -} - -size_t GoogleSOCSCookie_timeData::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - size_t total_size = 0; - - // required uint64 timeStamp = 1; - if (_internal_has_timestamp()) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timestamp()); - } - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); - } - int cached_size = ::_pbi::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GoogleSOCSCookie_timeData::CheckTypeAndMergeFrom( - const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast<const GoogleSOCSCookie_timeData*>( - &from)); -} - -void GoogleSOCSCookie_timeData::MergeFrom(const GoogleSOCSCookie_timeData& from) { - GoogleSOCSCookie_timeData* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_timestamp()) { - _this->_internal_set_timestamp(from._internal_timestamp()); - } - _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); -} - -void GoogleSOCSCookie_timeData::CopyFrom(const GoogleSOCSCookie_timeData& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GoogleSOCSCookie_timeData::IsInitialized() const { - if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; - return true; -} - -void GoogleSOCSCookie_timeData::InternalSwap(GoogleSOCSCookie_timeData* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.timestamp_, other->_impl_.timestamp_); -} - -std::string GoogleSOCSCookie_timeData::GetTypeName() const { - return "mozilla.cookieBanner.GoogleSOCSCookie.timeData"; -} - - -// =================================================================== - -class GoogleSOCSCookie::_Internal { - public: - using HasBits = decltype(std::declval<GoogleSOCSCookie>()._impl_._has_bits_); - static void set_has_gdpr_choice(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData& data(const GoogleSOCSCookie* msg); - static void set_has_data(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData& time(const GoogleSOCSCookie* msg); - static void set_has_time(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static bool MissingRequiredFields(const HasBits& has_bits) { - return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0; - } -}; - -const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData& -GoogleSOCSCookie::_Internal::data(const GoogleSOCSCookie* msg) { - return *msg->_impl_.data_; -} -const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData& -GoogleSOCSCookie::_Internal::time(const GoogleSOCSCookie* msg) { - return *msg->_impl_.time_; -} -GoogleSOCSCookie::GoogleSOCSCookie(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:mozilla.cookieBanner.GoogleSOCSCookie) -} -GoogleSOCSCookie::GoogleSOCSCookie(const GoogleSOCSCookie& from) - : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - GoogleSOCSCookie* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.data_){nullptr} - , decltype(_impl_.time_){nullptr} - , decltype(_impl_.gdpr_choice_){}}; - - _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); - if (from._internal_has_data()) { - _this->_impl_.data_ = new ::mozilla::cookieBanner::GoogleSOCSCookie_extraData(*from._impl_.data_); - } - if (from._internal_has_time()) { - _this->_impl_.time_ = new ::mozilla::cookieBanner::GoogleSOCSCookie_timeData(*from._impl_.time_); - } - _this->_impl_.gdpr_choice_ = from._impl_.gdpr_choice_; - // @@protoc_insertion_point(copy_constructor:mozilla.cookieBanner.GoogleSOCSCookie) -} - -inline void GoogleSOCSCookie::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.data_){nullptr} - , decltype(_impl_.time_){nullptr} - , decltype(_impl_.gdpr_choice_){0u} - }; -} - -GoogleSOCSCookie::~GoogleSOCSCookie() { - // @@protoc_insertion_point(destructor:mozilla.cookieBanner.GoogleSOCSCookie) - if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void GoogleSOCSCookie::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.data_; - if (this != internal_default_instance()) delete _impl_.time_; -} - -void GoogleSOCSCookie::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void GoogleSOCSCookie::Clear() { -// @@protoc_insertion_point(message_clear_start:mozilla.cookieBanner.GoogleSOCSCookie) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.data_ != nullptr); - _impl_.data_->Clear(); - } - if (cached_has_bits & 0x00000002u) { - GOOGLE_DCHECK(_impl_.time_ != nullptr); - _impl_.time_->Clear(); - } - } - _impl_.gdpr_choice_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<std::string>(); -} - -const char* GoogleSOCSCookie::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // required uint32 gdpr_choice = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { - _Internal::set_has_gdpr_choice(&has_bits); - _impl_.gdpr_choice_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_data(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_time(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<std::string>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* GoogleSOCSCookie::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:mozilla.cookieBanner.GoogleSOCSCookie) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // required uint32 gdpr_choice = 1; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_gdpr_choice(), target); - } - - // required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2; - if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::data(this), - _Internal::data(this).GetCachedSize(), target, stream); - } - - // required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3; - if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::time(this), - _Internal::time(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), - static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); - } - // @@protoc_insertion_point(serialize_to_array_end:mozilla.cookieBanner.GoogleSOCSCookie) - return target; -} - -size_t GoogleSOCSCookie::RequiredFieldsByteSizeFallback() const { -// @@protoc_insertion_point(required_fields_byte_size_fallback_start:mozilla.cookieBanner.GoogleSOCSCookie) - size_t total_size = 0; - - if (_internal_has_data()) { - // required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.data_); - } - - if (_internal_has_time()) { - // required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.time_); - } - - if (_internal_has_gdpr_choice()) { - // required uint32 gdpr_choice = 1; - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_gdpr_choice()); - } - - return total_size; -} -size_t GoogleSOCSCookie::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:mozilla.cookieBanner.GoogleSOCSCookie) - size_t total_size = 0; - - if (((_impl_._has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present. - // required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.data_); - - // required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3; - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.time_); - - // required uint32 gdpr_choice = 1; - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_gdpr_choice()); - - } else { - total_size += RequiredFieldsByteSizeFallback(); - } - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); - } - int cached_size = ::_pbi::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GoogleSOCSCookie::CheckTypeAndMergeFrom( - const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast<const GoogleSOCSCookie*>( - &from)); -} - -void GoogleSOCSCookie::MergeFrom(const GoogleSOCSCookie& from) { - GoogleSOCSCookie* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.cookieBanner.GoogleSOCSCookie) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_mutable_data()->::mozilla::cookieBanner::GoogleSOCSCookie_extraData::MergeFrom( - from._internal_data()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_mutable_time()->::mozilla::cookieBanner::GoogleSOCSCookie_timeData::MergeFrom( - from._internal_time()); - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.gdpr_choice_ = from._impl_.gdpr_choice_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); -} - -void GoogleSOCSCookie::CopyFrom(const GoogleSOCSCookie& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.cookieBanner.GoogleSOCSCookie) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GoogleSOCSCookie::IsInitialized() const { - if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; - if (_internal_has_data()) { - if (!_impl_.data_->IsInitialized()) return false; - } - if (_internal_has_time()) { - if (!_impl_.time_->IsInitialized()) return false; - } - return true; -} - -void GoogleSOCSCookie::InternalSwap(GoogleSOCSCookie* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie, _impl_.gdpr_choice_) - + sizeof(GoogleSOCSCookie::_impl_.gdpr_choice_) - - PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie, _impl_.data_)>( - reinterpret_cast<char*>(&_impl_.data_), - reinterpret_cast<char*>(&other->_impl_.data_)); -} - -std::string GoogleSOCSCookie::GetTypeName() const { - return "mozilla.cookieBanner.GoogleSOCSCookie"; -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace cookieBanner -} // namespace mozilla -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* -Arena::CreateMaybeMessage< ::mozilla::cookieBanner::GoogleSOCSCookie_extraData >(Arena* arena) { - return Arena::CreateMessageInternal< ::mozilla::cookieBanner::GoogleSOCSCookie_extraData >(arena); -} -template<> PROTOBUF_NOINLINE ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* -Arena::CreateMaybeMessage< ::mozilla::cookieBanner::GoogleSOCSCookie_timeData >(Arena* arena) { - return Arena::CreateMessageInternal< ::mozilla::cookieBanner::GoogleSOCSCookie_timeData >(arena); -} -template<> PROTOBUF_NOINLINE ::mozilla::cookieBanner::GoogleSOCSCookie* -Arena::CreateMaybeMessage< ::mozilla::cookieBanner::GoogleSOCSCookie >(Arena* arena) { - return Arena::CreateMessageInternal< ::mozilla::cookieBanner::GoogleSOCSCookie >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include <google/protobuf/port_undef.inc> diff --git a/toolkit/components/cookiebanners/cookieBanner.pb.h b/toolkit/components/cookiebanners/cookieBanner.pb.h @@ -1,1058 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: cookieBanner.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_cookieBanner_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_cookieBanner_2eproto - -#include <limits> -#include <string> - -#include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include <google/protobuf/port_undef.inc> -#include <google/protobuf/io/coded_stream.h> -#include <google/protobuf/arena.h> -#include <google/protobuf/arenastring.h> -#include <google/protobuf/generated_message_util.h> -#include <google/protobuf/metadata_lite.h> -#include <google/protobuf/message_lite.h> -#include <google/protobuf/repeated_field.h> // IWYU pragma: export -#include <google/protobuf/extension_set.h> // IWYU pragma: export -// @@protoc_insertion_point(includes) -#include <google/protobuf/port_def.inc> -#define PROTOBUF_INTERNAL_EXPORT_cookieBanner_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_cookieBanner_2eproto { - static const uint32_t offsets[]; -}; -namespace mozilla { -namespace cookieBanner { -class GoogleSOCSCookie; -struct GoogleSOCSCookieDefaultTypeInternal; -extern GoogleSOCSCookieDefaultTypeInternal _GoogleSOCSCookie_default_instance_; -class GoogleSOCSCookie_extraData; -struct GoogleSOCSCookie_extraDataDefaultTypeInternal; -extern GoogleSOCSCookie_extraDataDefaultTypeInternal _GoogleSOCSCookie_extraData_default_instance_; -class GoogleSOCSCookie_timeData; -struct GoogleSOCSCookie_timeDataDefaultTypeInternal; -extern GoogleSOCSCookie_timeDataDefaultTypeInternal _GoogleSOCSCookie_timeData_default_instance_; -} // namespace cookieBanner -} // namespace mozilla -PROTOBUF_NAMESPACE_OPEN -template<> ::mozilla::cookieBanner::GoogleSOCSCookie* Arena::CreateMaybeMessage<::mozilla::cookieBanner::GoogleSOCSCookie>(Arena*); -template<> ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* Arena::CreateMaybeMessage<::mozilla::cookieBanner::GoogleSOCSCookie_extraData>(Arena*); -template<> ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* Arena::CreateMaybeMessage<::mozilla::cookieBanner::GoogleSOCSCookie_timeData>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace mozilla { -namespace cookieBanner { - -// =================================================================== - -class GoogleSOCSCookie_extraData final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.cookieBanner.GoogleSOCSCookie.extraData) */ { - public: - inline GoogleSOCSCookie_extraData() : GoogleSOCSCookie_extraData(nullptr) {} - ~GoogleSOCSCookie_extraData() override; - explicit PROTOBUF_CONSTEXPR GoogleSOCSCookie_extraData(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GoogleSOCSCookie_extraData(const GoogleSOCSCookie_extraData& from); - GoogleSOCSCookie_extraData(GoogleSOCSCookie_extraData&& from) noexcept - : GoogleSOCSCookie_extraData() { - *this = ::std::move(from); - } - - inline GoogleSOCSCookie_extraData& operator=(const GoogleSOCSCookie_extraData& from) { - CopyFrom(from); - return *this; - } - inline GoogleSOCSCookie_extraData& operator=(GoogleSOCSCookie_extraData&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const std::string& unknown_fields() const { - return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<std::string>(); - } - - static const GoogleSOCSCookie_extraData& default_instance() { - return *internal_default_instance(); - } - static inline const GoogleSOCSCookie_extraData* internal_default_instance() { - return reinterpret_cast<const GoogleSOCSCookie_extraData*>( - &_GoogleSOCSCookie_extraData_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(GoogleSOCSCookie_extraData& a, GoogleSOCSCookie_extraData& b) { - a.Swap(&b); - } - inline void Swap(GoogleSOCSCookie_extraData* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(GoogleSOCSCookie_extraData* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - GoogleSOCSCookie_extraData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage<GoogleSOCSCookie_extraData>(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const GoogleSOCSCookie_extraData& from); - void MergeFrom(const GoogleSOCSCookie_extraData& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(GoogleSOCSCookie_extraData* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "mozilla.cookieBanner.GoogleSOCSCookie.extraData"; - } - protected: - explicit GoogleSOCSCookie_extraData(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kPlatformFieldNumber = 2, - kRegionFieldNumber = 3, - kUnused1FieldNumber = 1, - kUnused2FieldNumber = 4, - }; - // required string platform = 2; - bool has_platform() const; - private: - bool _internal_has_platform() const; - public: - void clear_platform(); - const std::string& platform() const; - template <typename ArgT0 = const std::string&, typename... ArgT> - void set_platform(ArgT0&& arg0, ArgT... args); - std::string* mutable_platform(); - PROTOBUF_NODISCARD std::string* release_platform(); - void set_allocated_platform(std::string* platform); - private: - const std::string& _internal_platform() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_platform(const std::string& value); - std::string* _internal_mutable_platform(); - public: - - // required string region = 3; - bool has_region() const; - private: - bool _internal_has_region() const; - public: - void clear_region(); - const std::string& region() const; - template <typename ArgT0 = const std::string&, typename... ArgT> - void set_region(ArgT0&& arg0, ArgT... args); - std::string* mutable_region(); - PROTOBUF_NODISCARD std::string* release_region(); - void set_allocated_region(std::string* region); - private: - const std::string& _internal_region() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_region(const std::string& value); - std::string* _internal_mutable_region(); - public: - - // required uint32 unused1 = 1; - bool has_unused1() const; - private: - bool _internal_has_unused1() const; - public: - void clear_unused1(); - uint32_t unused1() const; - void set_unused1(uint32_t value); - private: - uint32_t _internal_unused1() const; - void _internal_set_unused1(uint32_t value); - public: - - // required uint32 unused2 = 4; - bool has_unused2() const; - private: - bool _internal_has_unused2() const; - public: - void clear_unused2(); - uint32_t unused2() const; - void set_unused2(uint32_t value); - private: - uint32_t _internal_unused2() const; - void _internal_set_unused2(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:mozilla.cookieBanner.GoogleSOCSCookie.extraData) - private: - class _Internal; - - // helper for ByteSizeLong() - size_t RequiredFieldsByteSizeFallback() const; - - template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr platform_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr region_; - uint32_t unused1_; - uint32_t unused2_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_cookieBanner_2eproto; -}; -// ------------------------------------------------------------------- - -class GoogleSOCSCookie_timeData final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.cookieBanner.GoogleSOCSCookie.timeData) */ { - public: - inline GoogleSOCSCookie_timeData() : GoogleSOCSCookie_timeData(nullptr) {} - ~GoogleSOCSCookie_timeData() override; - explicit PROTOBUF_CONSTEXPR GoogleSOCSCookie_timeData(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GoogleSOCSCookie_timeData(const GoogleSOCSCookie_timeData& from); - GoogleSOCSCookie_timeData(GoogleSOCSCookie_timeData&& from) noexcept - : GoogleSOCSCookie_timeData() { - *this = ::std::move(from); - } - - inline GoogleSOCSCookie_timeData& operator=(const GoogleSOCSCookie_timeData& from) { - CopyFrom(from); - return *this; - } - inline GoogleSOCSCookie_timeData& operator=(GoogleSOCSCookie_timeData&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const std::string& unknown_fields() const { - return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<std::string>(); - } - - static const GoogleSOCSCookie_timeData& default_instance() { - return *internal_default_instance(); - } - static inline const GoogleSOCSCookie_timeData* internal_default_instance() { - return reinterpret_cast<const GoogleSOCSCookie_timeData*>( - &_GoogleSOCSCookie_timeData_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(GoogleSOCSCookie_timeData& a, GoogleSOCSCookie_timeData& b) { - a.Swap(&b); - } - inline void Swap(GoogleSOCSCookie_timeData* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(GoogleSOCSCookie_timeData* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - GoogleSOCSCookie_timeData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage<GoogleSOCSCookie_timeData>(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const GoogleSOCSCookie_timeData& from); - void MergeFrom(const GoogleSOCSCookie_timeData& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(GoogleSOCSCookie_timeData* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "mozilla.cookieBanner.GoogleSOCSCookie.timeData"; - } - protected: - explicit GoogleSOCSCookie_timeData(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTimeStampFieldNumber = 1, - }; - // required uint64 timeStamp = 1; - bool has_timestamp() const; - private: - bool _internal_has_timestamp() const; - public: - void clear_timestamp(); - uint64_t timestamp() const; - void set_timestamp(uint64_t value); - private: - uint64_t _internal_timestamp() const; - void _internal_set_timestamp(uint64_t value); - public: - - // @@protoc_insertion_point(class_scope:mozilla.cookieBanner.GoogleSOCSCookie.timeData) - private: - class _Internal; - - template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint64_t timestamp_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_cookieBanner_2eproto; -}; -// ------------------------------------------------------------------- - -class GoogleSOCSCookie final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.cookieBanner.GoogleSOCSCookie) */ { - public: - inline GoogleSOCSCookie() : GoogleSOCSCookie(nullptr) {} - ~GoogleSOCSCookie() override; - explicit PROTOBUF_CONSTEXPR GoogleSOCSCookie(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GoogleSOCSCookie(const GoogleSOCSCookie& from); - GoogleSOCSCookie(GoogleSOCSCookie&& from) noexcept - : GoogleSOCSCookie() { - *this = ::std::move(from); - } - - inline GoogleSOCSCookie& operator=(const GoogleSOCSCookie& from) { - CopyFrom(from); - return *this; - } - inline GoogleSOCSCookie& operator=(GoogleSOCSCookie&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const std::string& unknown_fields() const { - return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<std::string>(); - } - - static const GoogleSOCSCookie& default_instance() { - return *internal_default_instance(); - } - static inline const GoogleSOCSCookie* internal_default_instance() { - return reinterpret_cast<const GoogleSOCSCookie*>( - &_GoogleSOCSCookie_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(GoogleSOCSCookie& a, GoogleSOCSCookie& b) { - a.Swap(&b); - } - inline void Swap(GoogleSOCSCookie* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(GoogleSOCSCookie* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - GoogleSOCSCookie* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage<GoogleSOCSCookie>(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const GoogleSOCSCookie& from); - void MergeFrom(const GoogleSOCSCookie& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(GoogleSOCSCookie* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "mozilla.cookieBanner.GoogleSOCSCookie"; - } - protected: - explicit GoogleSOCSCookie(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - typedef GoogleSOCSCookie_extraData extraData; - typedef GoogleSOCSCookie_timeData timeData; - - // accessors ------------------------------------------------------- - - enum : int { - kDataFieldNumber = 2, - kTimeFieldNumber = 3, - kGdprChoiceFieldNumber = 1, - }; - // required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2; - bool has_data() const; - private: - bool _internal_has_data() const; - public: - void clear_data(); - const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData& data() const; - PROTOBUF_NODISCARD ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* release_data(); - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* mutable_data(); - void set_allocated_data(::mozilla::cookieBanner::GoogleSOCSCookie_extraData* data); - private: - const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData& _internal_data() const; - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* _internal_mutable_data(); - public: - void unsafe_arena_set_allocated_data( - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* data); - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* unsafe_arena_release_data(); - - // required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3; - bool has_time() const; - private: - bool _internal_has_time() const; - public: - void clear_time(); - const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData& time() const; - PROTOBUF_NODISCARD ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* release_time(); - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* mutable_time(); - void set_allocated_time(::mozilla::cookieBanner::GoogleSOCSCookie_timeData* time); - private: - const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData& _internal_time() const; - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* _internal_mutable_time(); - public: - void unsafe_arena_set_allocated_time( - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* time); - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* unsafe_arena_release_time(); - - // required uint32 gdpr_choice = 1; - bool has_gdpr_choice() const; - private: - bool _internal_has_gdpr_choice() const; - public: - void clear_gdpr_choice(); - uint32_t gdpr_choice() const; - void set_gdpr_choice(uint32_t value); - private: - uint32_t _internal_gdpr_choice() const; - void _internal_set_gdpr_choice(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:mozilla.cookieBanner.GoogleSOCSCookie) - private: - class _Internal; - - // helper for ByteSizeLong() - size_t RequiredFieldsByteSizeFallback() const; - - template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* data_; - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* time_; - uint32_t gdpr_choice_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_cookieBanner_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// GoogleSOCSCookie_extraData - -// required uint32 unused1 = 1; -inline bool GoogleSOCSCookie_extraData::_internal_has_unused1() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool GoogleSOCSCookie_extraData::has_unused1() const { - return _internal_has_unused1(); -} -inline void GoogleSOCSCookie_extraData::clear_unused1() { - _impl_.unused1_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t GoogleSOCSCookie_extraData::_internal_unused1() const { - return _impl_.unused1_; -} -inline uint32_t GoogleSOCSCookie_extraData::unused1() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.extraData.unused1) - return _internal_unused1(); -} -inline void GoogleSOCSCookie_extraData::_internal_set_unused1(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.unused1_ = value; -} -inline void GoogleSOCSCookie_extraData::set_unused1(uint32_t value) { - _internal_set_unused1(value); - // @@protoc_insertion_point(field_set:mozilla.cookieBanner.GoogleSOCSCookie.extraData.unused1) -} - -// required string platform = 2; -inline bool GoogleSOCSCookie_extraData::_internal_has_platform() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool GoogleSOCSCookie_extraData::has_platform() const { - return _internal_has_platform(); -} -inline void GoogleSOCSCookie_extraData::clear_platform() { - _impl_.platform_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const std::string& GoogleSOCSCookie_extraData::platform() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.extraData.platform) - return _internal_platform(); -} -template <typename ArgT0, typename... ArgT> -inline PROTOBUF_ALWAYS_INLINE -void GoogleSOCSCookie_extraData::set_platform(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.platform_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:mozilla.cookieBanner.GoogleSOCSCookie.extraData.platform) -} -inline std::string* GoogleSOCSCookie_extraData::mutable_platform() { - std::string* _s = _internal_mutable_platform(); - // @@protoc_insertion_point(field_mutable:mozilla.cookieBanner.GoogleSOCSCookie.extraData.platform) - return _s; -} -inline const std::string& GoogleSOCSCookie_extraData::_internal_platform() const { - return _impl_.platform_.Get(); -} -inline void GoogleSOCSCookie_extraData::_internal_set_platform(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.platform_.Set(value, GetArenaForAllocation()); -} -inline std::string* GoogleSOCSCookie_extraData::_internal_mutable_platform() { - _impl_._has_bits_[0] |= 0x00000001u; - return _impl_.platform_.Mutable(GetArenaForAllocation()); -} -inline std::string* GoogleSOCSCookie_extraData::release_platform() { - // @@protoc_insertion_point(field_release:mozilla.cookieBanner.GoogleSOCSCookie.extraData.platform) - if (!_internal_has_platform()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001u; - auto* p = _impl_.platform_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.platform_.IsDefault()) { - _impl_.platform_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void GoogleSOCSCookie_extraData::set_allocated_platform(std::string* platform) { - if (platform != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.platform_.SetAllocated(platform, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.platform_.IsDefault()) { - _impl_.platform_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:mozilla.cookieBanner.GoogleSOCSCookie.extraData.platform) -} - -// required string region = 3; -inline bool GoogleSOCSCookie_extraData::_internal_has_region() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool GoogleSOCSCookie_extraData::has_region() const { - return _internal_has_region(); -} -inline void GoogleSOCSCookie_extraData::clear_region() { - _impl_.region_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline const std::string& GoogleSOCSCookie_extraData::region() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.extraData.region) - return _internal_region(); -} -template <typename ArgT0, typename... ArgT> -inline PROTOBUF_ALWAYS_INLINE -void GoogleSOCSCookie_extraData::set_region(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.region_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:mozilla.cookieBanner.GoogleSOCSCookie.extraData.region) -} -inline std::string* GoogleSOCSCookie_extraData::mutable_region() { - std::string* _s = _internal_mutable_region(); - // @@protoc_insertion_point(field_mutable:mozilla.cookieBanner.GoogleSOCSCookie.extraData.region) - return _s; -} -inline const std::string& GoogleSOCSCookie_extraData::_internal_region() const { - return _impl_.region_.Get(); -} -inline void GoogleSOCSCookie_extraData::_internal_set_region(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.region_.Set(value, GetArenaForAllocation()); -} -inline std::string* GoogleSOCSCookie_extraData::_internal_mutable_region() { - _impl_._has_bits_[0] |= 0x00000002u; - return _impl_.region_.Mutable(GetArenaForAllocation()); -} -inline std::string* GoogleSOCSCookie_extraData::release_region() { - // @@protoc_insertion_point(field_release:mozilla.cookieBanner.GoogleSOCSCookie.extraData.region) - if (!_internal_has_region()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000002u; - auto* p = _impl_.region_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.region_.IsDefault()) { - _impl_.region_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void GoogleSOCSCookie_extraData::set_allocated_region(std::string* region) { - if (region != nullptr) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.region_.SetAllocated(region, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.region_.IsDefault()) { - _impl_.region_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:mozilla.cookieBanner.GoogleSOCSCookie.extraData.region) -} - -// required uint32 unused2 = 4; -inline bool GoogleSOCSCookie_extraData::_internal_has_unused2() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool GoogleSOCSCookie_extraData::has_unused2() const { - return _internal_has_unused2(); -} -inline void GoogleSOCSCookie_extraData::clear_unused2() { - _impl_.unused2_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t GoogleSOCSCookie_extraData::_internal_unused2() const { - return _impl_.unused2_; -} -inline uint32_t GoogleSOCSCookie_extraData::unused2() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.extraData.unused2) - return _internal_unused2(); -} -inline void GoogleSOCSCookie_extraData::_internal_set_unused2(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.unused2_ = value; -} -inline void GoogleSOCSCookie_extraData::set_unused2(uint32_t value) { - _internal_set_unused2(value); - // @@protoc_insertion_point(field_set:mozilla.cookieBanner.GoogleSOCSCookie.extraData.unused2) -} - -// ------------------------------------------------------------------- - -// GoogleSOCSCookie_timeData - -// required uint64 timeStamp = 1; -inline bool GoogleSOCSCookie_timeData::_internal_has_timestamp() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool GoogleSOCSCookie_timeData::has_timestamp() const { - return _internal_has_timestamp(); -} -inline void GoogleSOCSCookie_timeData::clear_timestamp() { - _impl_.timestamp_ = uint64_t{0u}; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint64_t GoogleSOCSCookie_timeData::_internal_timestamp() const { - return _impl_.timestamp_; -} -inline uint64_t GoogleSOCSCookie_timeData::timestamp() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.timeData.timeStamp) - return _internal_timestamp(); -} -inline void GoogleSOCSCookie_timeData::_internal_set_timestamp(uint64_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.timestamp_ = value; -} -inline void GoogleSOCSCookie_timeData::set_timestamp(uint64_t value) { - _internal_set_timestamp(value); - // @@protoc_insertion_point(field_set:mozilla.cookieBanner.GoogleSOCSCookie.timeData.timeStamp) -} - -// ------------------------------------------------------------------- - -// GoogleSOCSCookie - -// required uint32 gdpr_choice = 1; -inline bool GoogleSOCSCookie::_internal_has_gdpr_choice() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool GoogleSOCSCookie::has_gdpr_choice() const { - return _internal_has_gdpr_choice(); -} -inline void GoogleSOCSCookie::clear_gdpr_choice() { - _impl_.gdpr_choice_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t GoogleSOCSCookie::_internal_gdpr_choice() const { - return _impl_.gdpr_choice_; -} -inline uint32_t GoogleSOCSCookie::gdpr_choice() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.gdpr_choice) - return _internal_gdpr_choice(); -} -inline void GoogleSOCSCookie::_internal_set_gdpr_choice(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.gdpr_choice_ = value; -} -inline void GoogleSOCSCookie::set_gdpr_choice(uint32_t value) { - _internal_set_gdpr_choice(value); - // @@protoc_insertion_point(field_set:mozilla.cookieBanner.GoogleSOCSCookie.gdpr_choice) -} - -// required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2; -inline bool GoogleSOCSCookie::_internal_has_data() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.data_ != nullptr); - return value; -} -inline bool GoogleSOCSCookie::has_data() const { - return _internal_has_data(); -} -inline void GoogleSOCSCookie::clear_data() { - if (_impl_.data_ != nullptr) _impl_.data_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData& GoogleSOCSCookie::_internal_data() const { - const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* p = _impl_.data_; - return p != nullptr ? *p : reinterpret_cast<const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData&>( - ::mozilla::cookieBanner::_GoogleSOCSCookie_extraData_default_instance_); -} -inline const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData& GoogleSOCSCookie::data() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.data) - return _internal_data(); -} -inline void GoogleSOCSCookie::unsafe_arena_set_allocated_data( - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* data) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.data_); - } - _impl_.data_ = data; - if (data) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.cookieBanner.GoogleSOCSCookie.data) -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* GoogleSOCSCookie::release_data() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* temp = _impl_.data_; - _impl_.data_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* GoogleSOCSCookie::unsafe_arena_release_data() { - // @@protoc_insertion_point(field_release:mozilla.cookieBanner.GoogleSOCSCookie.data) - _impl_._has_bits_[0] &= ~0x00000001u; - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* temp = _impl_.data_; - _impl_.data_ = nullptr; - return temp; -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* GoogleSOCSCookie::_internal_mutable_data() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.data_ == nullptr) { - auto* p = CreateMaybeMessage<::mozilla::cookieBanner::GoogleSOCSCookie_extraData>(GetArenaForAllocation()); - _impl_.data_ = p; - } - return _impl_.data_; -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* GoogleSOCSCookie::mutable_data() { - ::mozilla::cookieBanner::GoogleSOCSCookie_extraData* _msg = _internal_mutable_data(); - // @@protoc_insertion_point(field_mutable:mozilla.cookieBanner.GoogleSOCSCookie.data) - return _msg; -} -inline void GoogleSOCSCookie::set_allocated_data(::mozilla::cookieBanner::GoogleSOCSCookie_extraData* data) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.data_; - } - if (data) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data); - if (message_arena != submessage_arena) { - data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, data, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.data_ = data; - // @@protoc_insertion_point(field_set_allocated:mozilla.cookieBanner.GoogleSOCSCookie.data) -} - -// required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3; -inline bool GoogleSOCSCookie::_internal_has_time() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - PROTOBUF_ASSUME(!value || _impl_.time_ != nullptr); - return value; -} -inline bool GoogleSOCSCookie::has_time() const { - return _internal_has_time(); -} -inline void GoogleSOCSCookie::clear_time() { - if (_impl_.time_ != nullptr) _impl_.time_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData& GoogleSOCSCookie::_internal_time() const { - const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* p = _impl_.time_; - return p != nullptr ? *p : reinterpret_cast<const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData&>( - ::mozilla::cookieBanner::_GoogleSOCSCookie_timeData_default_instance_); -} -inline const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData& GoogleSOCSCookie::time() const { - // @@protoc_insertion_point(field_get:mozilla.cookieBanner.GoogleSOCSCookie.time) - return _internal_time(); -} -inline void GoogleSOCSCookie::unsafe_arena_set_allocated_time( - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* time) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.time_); - } - _impl_.time_ = time; - if (time) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.cookieBanner.GoogleSOCSCookie.time) -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* GoogleSOCSCookie::release_time() { - _impl_._has_bits_[0] &= ~0x00000002u; - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* temp = _impl_.time_; - _impl_.time_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* GoogleSOCSCookie::unsafe_arena_release_time() { - // @@protoc_insertion_point(field_release:mozilla.cookieBanner.GoogleSOCSCookie.time) - _impl_._has_bits_[0] &= ~0x00000002u; - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* temp = _impl_.time_; - _impl_.time_ = nullptr; - return temp; -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* GoogleSOCSCookie::_internal_mutable_time() { - _impl_._has_bits_[0] |= 0x00000002u; - if (_impl_.time_ == nullptr) { - auto* p = CreateMaybeMessage<::mozilla::cookieBanner::GoogleSOCSCookie_timeData>(GetArenaForAllocation()); - _impl_.time_ = p; - } - return _impl_.time_; -} -inline ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* GoogleSOCSCookie::mutable_time() { - ::mozilla::cookieBanner::GoogleSOCSCookie_timeData* _msg = _internal_mutable_time(); - // @@protoc_insertion_point(field_mutable:mozilla.cookieBanner.GoogleSOCSCookie.time) - return _msg; -} -inline void GoogleSOCSCookie::set_allocated_time(::mozilla::cookieBanner::GoogleSOCSCookie_timeData* time) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.time_; - } - if (time) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(time); - if (message_arena != submessage_arena) { - time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, time, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.time_ = time; - // @@protoc_insertion_point(field_set_allocated:mozilla.cookieBanner.GoogleSOCSCookie.time) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace cookieBanner -} // namespace mozilla - -// @@protoc_insertion_point(global_scope) - -#include <google/protobuf/port_undef.inc> -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_cookieBanner_2eproto diff --git a/toolkit/components/cookiebanners/cookieBanner.proto b/toolkit/components/cookiebanners/cookieBanner.proto @@ -1,25 +0,0 @@ -syntax = "proto2"; - -option optimize_for = LITE_RUNTIME; - -package mozilla.cookieBanner; - -// Represent the SOCS cookie used to store GDPR choice on the google search. -message GoogleSOCSCookie { - // The GDPR choice. 1 means reject All and 2 means Accept or Custom. - required uint32 gdpr_choice = 1; - message extraData { - required uint32 unused1 = 1; - // The value Represents where does the consent is set. We will use this - // value to differentiate Accept and Custom. - required string platform = 2; - required string region = 3; - required uint32 unused2 = 4; - } - required extraData data = 2; - - message timeData { - required uint64 timeStamp = 1; - } - required timeData time = 3; -} diff --git a/toolkit/components/cookiebanners/metrics.yaml b/toolkit/components/cookiebanners/metrics.yaml @@ -62,68 +62,3 @@ cookie.banners: - emz@mozilla.com expires: never telemetry_mirror: COOKIE_BANNERS_SERVICE_DETECT_ONLY - google_gdpr_choice_cookie: - type: labeled_string - description: > - Records the GDPR choice on Google Search based on the "SOCS" cookie of the - Google Search domains. The value could be "Accept", "Reject" or "Custom". - We use the label to record different choices on different Google domains. - We only collect this if the default search engine is Google. - bugs: - - https://bugzilla.mozilla.org/1874741 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1874741#c10 - data_sensitivity: - - stored_content - notification_emails: - - emz@mozilla.com - - tihuang@mozilla.com - expires: never - google_gdpr_choice_cookie_event: - type: event - description: > - Recorded whenever a GDPR choice is made on a Google Search page. We assess - the "SOCS" cookie to know the GDPR choice. - bugs: - - https://bugzilla.mozilla.org/1874741 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1874741#c10 - data_sensitivity: - - stored_content - notification_emails: - - emz@mozilla.com - - tihuang@mozilla.com - expires: never - extra_keys: - search_domain: - description: The Google search domain where the GDPR choice was made. - type: string - choice: - description: > - The GDPR choice. The value could be "Accept", "Reject" or "Custom". - type: string - region: - description: > - The region where the GDPR consent is made. This is based on the IP - location. - type: string - google_gdpr_choice_cookie_event_pbm: - type: event - description: > - Recorded whenever a GDPR choice is made on a Google Search page on private - browsing windows. We assess the "SOCS" cookie to know the GDPR choice. - bugs: - - https://bugzilla.mozilla.org/1874741 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1874741#c10 - data_sensitivity: - - stored_content - notification_emails: - - emz@mozilla.com - - tihuang@mozilla.com - expires: never - extra_keys: - choice: - description: > - The GDPR choice. The value could be "Accept", "Reject" or "Custom". - type: string diff --git a/toolkit/components/cookiebanners/moz.build b/toolkit/components/cookiebanners/moz.build @@ -14,15 +14,11 @@ XPIDL_SOURCES += [ "nsICookieBannerListService.idl", "nsICookieBannerRule.idl", "nsICookieBannerService.idl", - "nsICookieBannerTelemetryService.idl", "nsICookieRule.idl", ] XPIDL_MODULE = "toolkit_cookiebanners" -DEFINES["GOOGLE_PROTOBUF_NO_RTTI"] = True -DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True - EXTRA_JS_MODULES += [ "CookieBannerListService.sys.mjs", ] @@ -35,18 +31,15 @@ EXPORTS.mozilla += [ "nsClickRule.h", "nsCookieBannerRule.h", "nsCookieBannerService.h", - "nsCookieBannerTelemetryService.h", "nsCookieInjector.h", "nsCookieRule.h", ] UNIFIED_SOURCES += [ - "cookieBanner.pb.cc", "CookieBannerDomainPrefService.cpp", "nsClickRule.cpp", "nsCookieBannerRule.cpp", "nsCookieBannerService.cpp", - "nsCookieBannerTelemetryService.cpp", "nsCookieInjector.cpp", "nsCookieRule.cpp", ] diff --git a/toolkit/components/cookiebanners/nsCookieBannerTelemetryService.cpp b/toolkit/components/cookiebanners/nsCookieBannerTelemetryService.cpp @@ -1,389 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "nsCookieBannerTelemetryService.h" - -#include "cookieBanner.pb.h" - -#include "mozilla/Base64.h" -#include "mozilla/ClearOnShutdown.h" -#include "mozilla/glean/CookiebannersMetrics.h" -#include "mozilla/OriginAttributes.h" -#include "mozilla/StaticPtr.h" -#include "mozilla/Logging.h" -#include "Cookie.h" -#include "nsCRT.h" -#include "nsError.h" -#include "nsICookie.h" -#include "nsICookieManager.h" -#include "nsICookieNotification.h" -#include "nsTHashSet.h" -#include "nsIObserverService.h" -#include "nsIScriptSecurityManager.h" -#include "nsISearchService.h" -#include "nsServiceManagerUtils.h" -#include "nsStringFwd.h" -#include "nsTArray.h" - -namespace mozilla { - -NS_IMPL_ISUPPORTS(nsCookieBannerTelemetryService, - nsICookieBannerTelemetryService, nsIObserver) - -static LazyLogModule gCookieBannerTelemetryLog( - "nsCookieBannerTelemetryService"); - -static StaticRefPtr<nsCookieBannerTelemetryService> - sCookieBannerTelemetryServiceSingleton; - -// A hash set used to tell whether a base domain is a Google domain. -static StaticAutoPtr<nsTHashSet<nsCString>> sGoogleDomainsSet; - -namespace { - -// A helper function that decodes Google's SOCS cookie and returns the GDPR -// choice and the region. The choice and be either "Accept", "Reject", or -// "Custom". -nsresult DecodeSOCSGoogleCookie(const nsACString& aCookie, nsACString& aChoice, - nsACString& aRegion) { - aChoice.Truncate(); - aRegion.Truncate(); - - FallibleTArray<uint8_t> decoded; - nsresult rv = - Base64URLDecode(aCookie, Base64URLDecodePaddingPolicy::Ignore, decoded); - NS_ENSURE_SUCCESS(rv, rv); - - std::string buf(reinterpret_cast<const char*>(decoded.Elements()), - decoded.Length()); - cookieBanner::GoogleSOCSCookie socs; - - if (!socs.ParseFromString(buf)) { - return NS_ERROR_CANNOT_CONVERT_DATA; - } - - aRegion.Assign(socs.data().region().c_str(), socs.data().region().length()); - - // The first field represents the gdpr choice, 1 means "Reject" and 2 means - // either "Accept" or "Custom". We need to check a following field to decide. - if (socs.gdpr_choice() == 1) { - aChoice.AssignLiteral("Reject"); - return NS_OK; - } - - // The platform field represents where does this GDPR consent is selected. The - // value can be either "gws_*" or "boq_identityfrontenduiserver_*". If the - // field value starts with "gws_", it means the consent is from the Google - // search page. Otherwise, it's from the consent.google.com, which is used for - // the custom setting. - std::string prefix = "gws_"; - - if (socs.data().platform().compare(0, prefix.length(), prefix) == 0) { - aChoice.AssignLiteral("Accept"); - return NS_OK; - } - - aChoice.AssignLiteral("Custom"); - return NS_OK; -} - -} // anonymous namespace - -// static -already_AddRefed<nsCookieBannerTelemetryService> -nsCookieBannerTelemetryService::GetSingleton() { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, ("GetSingleton.")); - - if (!sCookieBannerTelemetryServiceSingleton) { - sCookieBannerTelemetryServiceSingleton = - new nsCookieBannerTelemetryService(); - - RunOnShutdown([] { - DebugOnly<nsresult> rv = - sCookieBannerTelemetryServiceSingleton->Shutdown(); - NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), - "nsCookieBannerTelemetryService::Shutdown failed."); - - sCookieBannerTelemetryServiceSingleton = nullptr; - }); - } - - return do_AddRef(sCookieBannerTelemetryServiceSingleton); -} - -nsresult nsCookieBannerTelemetryService::Init() { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, ("Init.")); - if (mIsInitialized) { - return NS_OK; - } - - mIsInitialized = true; - - nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService(); - NS_ENSURE_TRUE(obsSvc, NS_ERROR_FAILURE); - - nsresult rv = obsSvc->AddObserver(this, "browser-search-service", false); - NS_ENSURE_SUCCESS(rv, rv); - - rv = obsSvc->AddObserver(this, "idle-daily", false); - NS_ENSURE_SUCCESS(rv, rv); - - rv = obsSvc->AddObserver(this, "cookie-changed", false); - NS_ENSURE_SUCCESS(rv, rv); - - rv = obsSvc->AddObserver(this, "private-cookie-changed", false); - NS_ENSURE_SUCCESS(rv, rv); - - return NS_OK; -} - -nsresult nsCookieBannerTelemetryService::Shutdown() { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, ("Shutdown.")); - - if (!mIsInitialized) { - return NS_OK; - } - - mIsInitialized = false; - - sGoogleDomainsSet = nullptr; - - nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService(); - NS_ENSURE_TRUE(obsSvc, NS_ERROR_FAILURE); - - nsresult rv = obsSvc->RemoveObserver(this, "browser-search-service"); - NS_ENSURE_SUCCESS(rv, rv); - - rv = obsSvc->RemoveObserver(this, "idle-daily"); - NS_ENSURE_SUCCESS(rv, rv); - - rv = obsSvc->RemoveObserver(this, "cookie-changed"); - NS_ENSURE_SUCCESS(rv, rv); - - rv = obsSvc->RemoveObserver(this, "private-cookie-changed"); - NS_ENSURE_SUCCESS(rv, rv); - - return NS_OK; -} - -NS_IMETHODIMP -nsCookieBannerTelemetryService::Observe(nsISupports* aSubject, - const char* aTopic, - const char16_t* aData) { - if (nsCRT::strcmp(aTopic, "profile-after-change") == 0) { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, - ("Observe profile-after-change")); - - return Init(); - } - - if (nsCRT::strcmp(aTopic, "idle-daily") == 0) { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, ("idle-daily")); - - return MaybeReportGoogleGDPRChoiceTelemetry(); - } - - if (nsCRT::strcmp(aTopic, "browser-search-service") == 0 && - nsDependentString(aData).EqualsLiteral("init-complete")) { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, - ("Observe browser-search-service::init-complete.")); - mIsSearchServiceInitialized = true; - - return MaybeReportGoogleGDPRChoiceTelemetry(); - } - - if (nsCRT::strcmp(aTopic, "cookie-changed") == 0 || - nsCRT::strcmp(aTopic, "private-cookie-changed") == 0) { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, ("Observe %s", aTopic)); - - nsCOMPtr<nsICookieNotification> notification = do_QueryInterface(aSubject); - NS_ENSURE_TRUE(notification, NS_ERROR_FAILURE); - - if (notification->GetAction() != nsICookieNotification::COOKIE_ADDED && - notification->GetAction() != nsICookieNotification::COOKIE_CHANGED) { - return NS_OK; - } - - nsCOMPtr<nsICookie> cookie; - nsresult rv = notification->GetCookie(getter_AddRefs(cookie)); - NS_ENSURE_SUCCESS(rv, rv); - - nsAutoCString name; - rv = cookie->GetName(name); - NS_ENSURE_SUCCESS(rv, rv); - - // Bail out early if this is not a SOCS cookie. - if (!name.EqualsLiteral("SOCS")) { - return NS_OK; - } - - // A "SOCS" cookie is added. We record the GDPR choice as well as an event - // telemetry for recording a choice has been made at the moment. - return MaybeReportGoogleGDPRChoiceTelemetry(cookie, true); - } - - return NS_OK; -} - -nsresult nsCookieBannerTelemetryService::MaybeReportGoogleGDPRChoiceTelemetry( - nsICookie* aCookie, bool aReportEvent) { - MOZ_ASSERT(mIsInitialized); - nsresult rv; - - // Don't report the telemetry if the search service is not yet initialized. - if (!mIsSearchServiceInitialized) { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, - ("Search Service is not yet initialized.")); - return NS_OK; - } - - // We only collect Google GDPR choice if Google is the default search engine. - nsCOMPtr<nsISearchService> searchService( - do_GetService("@mozilla.org/browser/search-service;1", &rv)); - NS_ENSURE_SUCCESS(rv, rv); - - nsCOMPtr<nsISearchEngine> engine; - rv = searchService->GetDefaultEngine(getter_AddRefs(engine)); - NS_ENSURE_SUCCESS(rv, rv); - - // Bail out early if no default search engine is available. This could happen - // if no search engine is shipped with the Gecko. - if (!engine) { - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, - ("No default search engine is available.")); - return NS_OK; - } - - nsAutoString id; - rv = engine->GetId(id); - NS_ENSURE_SUCCESS(rv, rv); - - // Bail out early if the default search engine is not Google. - if (!id.EqualsLiteral("google")) { - return NS_OK; - } - - // Build up the Google domain set from the alternative Google search domains - if (!sGoogleDomainsSet) { - sGoogleDomainsSet = new nsTHashSet<nsCString>(); - - nsTArray<nsCString> googleDomains; - rv = searchService->GetAlternateDomains("www.google.com"_ns, googleDomains); - NS_ENSURE_SUCCESS(rv, rv); - - for (const auto& domain : googleDomains) { - // We need to trim down the preceding "www" to get the host because the - // alternate domains provided by search service always have leading "www". - // However, the "SOCS" cookie is always set for all subdomains, e.g. - // ".google.com". Therefore, we need to trim down "www" to match the host - // of the cookie. - NS_ENSURE_TRUE(domain.Length() > 3, NS_ERROR_FAILURE); - sGoogleDomainsSet->Insert(Substring(domain, 3, domain.Length() - 3)); - } - } - - nsTArray<RefPtr<nsICookie>> cookies; - if (aCookie) { - const auto& attrs = aCookie->AsCookie().OriginAttributesRef(); - - // We only report cookies for the default originAttributes or private - // browsing mode. - if (attrs.IsPrivateBrowsing() || attrs == OriginAttributes()) { - cookies.AppendElement(RefPtr<nsICookie>(aCookie)); - } - } else { - // If no cookie is given, we will iterate all cookies under Google Search - // domains. - nsCOMPtr<nsICookieManager> cookieManager = - do_GetService("@mozilla.org/cookiemanager;1"); - if (!cookieManager) { - return NS_ERROR_FAILURE; - } - - for (const auto& domain : *sGoogleDomainsSet) { - // Getting Google Search cookies only for normal windows. We will exclude - // cookies of non-default originAttributes, like cookies from containers. - // - // Note that we need to trim the leading "." from the domain here. - nsTArray<RefPtr<nsICookie>> googleCookies; - rv = cookieManager->GetCookiesWithOriginAttributes( - u"{ \"privateBrowsingId\": 0, \"userContextId\": 0 }"_ns, - Substring(domain, 1, domain.Length() - 1), false, googleCookies); - NS_ENSURE_SUCCESS(rv, rv); - - cookies.AppendElements(googleCookies); - } - } - - for (const auto& cookie : cookies) { - nsAutoCString name; - rv = cookie->GetName(name); - NS_ENSURE_SUCCESS(rv, rv); - - if (!name.EqualsLiteral("SOCS")) { - continue; - } - - nsAutoCString host; - rv = cookie->GetHost(host); - NS_ENSURE_SUCCESS(rv, rv); - - if (!sGoogleDomainsSet->Contains(host)) { - continue; - } - - nsAutoCString value; - rv = cookie->GetValue(value); - NS_ENSURE_SUCCESS(rv, rv); - - nsAutoCString choice; - nsAutoCString region; - rv = DecodeSOCSGoogleCookie(value, choice, region); - NS_ENSURE_SUCCESS(rv, rv); - - bool isPrivateBrowsing = - cookie->AsCookie().OriginAttributesRef().IsPrivateBrowsing(); - - MOZ_LOG(gCookieBannerTelemetryLog, LogLevel::Debug, - ("Record the Google GDPR choice %s on the host %s in region %s for " - "the %s window", - choice.get(), host.get(), region.get(), - isPrivateBrowsing ? "private" : "normal")); - - // We rely on the dynamical labelled string which can send most 16 different - // labels per report. In average cases, 16 labels is sufficient because we - // expect a user might have only 1 or 2 "SOCS" cookies on different Google - // Search domains. - // - // Note that we only report event telemetry for private browsing windows - // because the private session is ephemeral. People can change GDPR - // choice across different private sessions, so it's hard to collect the - // state correctly. - if (!isPrivateBrowsing) { - glean::cookie_banners::google_gdpr_choice_cookie.Get(host).Set(choice); - } - - if (aReportEvent) { - if (isPrivateBrowsing) { - glean::cookie_banners::GoogleGdprChoiceCookieEventPbmExtra extra = { - .choice = Some(choice), - }; - glean::cookie_banners::google_gdpr_choice_cookie_event_pbm.Record( - Some(extra)); - } else { - glean::cookie_banners::GoogleGdprChoiceCookieEventExtra extra = { - .choice = Some(choice), - .region = Some(region), - .searchDomain = Some(host), - }; - glean::cookie_banners::google_gdpr_choice_cookie_event.Record( - Some(extra)); - } - } - } - - return NS_OK; -} - -} // namespace mozilla diff --git a/toolkit/components/cookiebanners/nsCookieBannerTelemetryService.h b/toolkit/components/cookiebanners/nsCookieBannerTelemetryService.h @@ -1,47 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef mozilla_nsCookieBannerTelemetryService_h__ -#define mozilla_nsCookieBannerTelemetryService_h__ - -#include "nsICookieBannerTelemetryService.h" - -#include "nsIObserver.h" - -class nsICookie; - -namespace mozilla { -class nsCookieBannerTelemetryService final - : public nsICookieBannerTelemetryService, - public nsIObserver { - NS_DECL_ISUPPORTS - NS_DECL_NSIOBSERVER - - NS_DECL_NSICOOKIEBANNERTELEMETRYSERVICE - - public: - static already_AddRefed<nsCookieBannerTelemetryService> GetSingleton(); - - private: - nsCookieBannerTelemetryService() = default; - ~nsCookieBannerTelemetryService() = default; - - bool mIsInitialized = false; - bool mIsSearchServiceInitialized = false; - - [[nodiscard]] nsresult Init(); - - [[nodiscard]] nsresult Shutdown(); - - // Record the telemetry regarding the GDPR choice on Google Search domains. - // We only record if the default search engine is Google. When passing no - // cookie, we will walk through all cookies under Google Search domains. - // Otherwise, we will report the GDPR choice according to the given cookie. - [[nodiscard]] nsresult MaybeReportGoogleGDPRChoiceTelemetry( - nsICookie* aCookie = nullptr, bool aReportEvent = false); -}; - -} // namespace mozilla - -#endif diff --git a/toolkit/components/cookiebanners/nsICookieBannerTelemetryService.idl b/toolkit/components/cookiebanners/nsICookieBannerTelemetryService.idl @@ -1,13 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "nsISupports.idl" - -/** - * Service singleton which collect cookie banner telemetry. - */ -[scriptable, builtinclass, uuid(56197e18-d144-45b5-9f77-84102f064462)] -interface nsICookieBannerTelemetryService : nsISupports {}; diff --git a/toolkit/components/cookiebanners/test/browser/browser.toml b/toolkit/components/cookiebanners/test/browser/browser.toml @@ -29,8 +29,6 @@ support-files = [ ["browser_bannerClicking_visibilityOverride.js"] support-files = ["file_banner_invisible.html"] -["browser_cookiebanner_gdpr_telemetry.js"] - ["browser_cookiebanner_telemetry.js"] ["browser_cookiebanner_webconsole.js"] diff --git a/toolkit/components/cookiebanners/test/browser/browser_cookiebanner_gdpr_telemetry.js b/toolkit/components/cookiebanners/test/browser/browser_cookiebanner_gdpr_telemetry.js @@ -1,189 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -const { SiteDataTestUtils } = ChromeUtils.importESModule( - "resource://testing-common/SiteDataTestUtils.sys.mjs" -); - -const TEST_CASES = [ - { - value: "CAISHAgBEhJnd3NfMjAyNDAzMjUtMF9SQzEaAmRlIAEaBgiAw42wBg", - expected: "Accept", - region: "de", - host: ".google.de", - }, - { - value: "CAESHAgBEhJnd3NfMjAyNDAzMjUtMF9SQzEaAmRlIAEaBgiAw42wBg", - expected: "Reject", - region: "de", - host: ".google.de", - }, - { - value: - "CAISNQgBEitib3FfaWRlbnRpdHlmcm9udGVuZHVpc2VydmVyXzIwMjQwMzI0LjA4X3AwGgJkZSADGgYIgMONsAY", - expected: "Custom", - region: "de", - host: ".google.de", - }, - { - value: "CAISHAgBEhJnd3NfMjAyNDAzMjUtMF9SQzEaAmVuIAEaBgiAw42wBg", - expected: "Accept", - region: "en", - host: ".google.com", - }, -]; - -add_setup(async function () { - registerCleanupFunction(async () => { - // Clear cookies that have been set during testing. - await SiteDataTestUtils.clear(); - }); -}); - -add_task(async function test_google_gdpr_telemetry() { - // Clear telemetry before starting telemetry test. - Services.fog.testResetFOG(); - - for (let test of TEST_CASES) { - // Add a Google SOCS cookie to trigger recording telemetry. - SiteDataTestUtils.addToCookies({ - name: "SOCS", - value: test.value, - host: test.host, - path: "/", - }); - - // Verify if the google GDPR choice cookie telemetry is recorded properly. - is( - Glean.cookieBanners.googleGdprChoiceCookie[test.host].testGetValue(), - test.expected, - "The Google GDPR telemetry is recorded properly." - ); - - // Verify the the event telemetry is recorded properly. - let events = Glean.cookieBanners.googleGdprChoiceCookieEvent.testGetValue(); - let event = events[events.length - 1]; - - is( - event.extra.search_domain, - test.host, - "The Google GDPR event telemetry records the search domain properly." - ); - - is( - event.extra.choice, - test.expected, - "The Google GDPR event telemetry records the choice properly." - ); - - is( - event.extra.region, - test.region, - "The Google GDPR event telemetry records the region properly." - ); - } - - is( - Glean.cookieBanners.googleGdprChoiceCookieEvent.testGetValue().length, - TEST_CASES.length, - "The number of events is expected." - ); -}); - -add_task(async function test_invalid_google_socs_cookies() { - // Clear telemetry before starting telemetry test. - Services.fog.testResetFOG(); - - // Add an invalid Google SOCS cookie which is not Base64 encoding. - SiteDataTestUtils.addToCookies({ - name: "SOCS", - value: "invalid", - host: ".google.com", - path: "/", - }); - - // Ensure no GDPR telemetry is recorded. - is( - Glean.cookieBanners.googleGdprChoiceCookie[".google.com"].testGetValue(), - null, - "No Google GDPR telemetry is recorded." - ); - - is( - Glean.cookieBanners.googleGdprChoiceCookieEvent.testGetValue(), - null, - "No event telemetry is recorded." - ); - - // Add an invalid Google SOCS cookie which is Base64 encoding but in wrong - // protobuf format. - SiteDataTestUtils.addToCookies({ - name: "SOCS", - value: "CAISAggBGgYIgMONsAY", - host: ".google.com", - path: "/", - }); - - // Ensure no GDPR telemetry is recorded. - is( - Glean.cookieBanners.googleGdprChoiceCookie[".google.com"].testGetValue(), - null, - "No Google GDPR telemetry is recorded." - ); - - is( - Glean.cookieBanners.googleGdprChoiceCookieEvent.testGetValue(), - null, - "No event telemetry is recorded." - ); -}); - -add_task(async function test_google_gdpr_telemetry_pbm() { - // Clear telemetry before starting telemetry test. - Services.fog.testResetFOG(); - - for (let test of TEST_CASES) { - // Add a private Google SOCS cookie to trigger recording telemetry. - SiteDataTestUtils.addToCookies({ - name: "SOCS", - value: test.value, - host: test.host, - path: "/", - originAttributes: { privateBrowsingId: 1 }, - }); - - // Ensure we don't record google GDPR choice cookie telemetry. - is( - Glean.cookieBanners.googleGdprChoiceCookie[test.host].testGetValue(), - null, - "No Google GDPR telemetry is recorded." - ); - - // Verify the the event telemetry for PBM is recorded properly. - let events = - Glean.cookieBanners.googleGdprChoiceCookieEventPbm.testGetValue(); - let event = events[events.length - 1]; - - is( - event.extra.choice, - test.expected, - "The Google GDPR event telemetry records the choice properly." - ); - - is(event.extra.search_domain, undefined, "No search domain is recorded."); - is(event.extra.region, undefined, "No region is recorded."); - } - - is( - Glean.cookieBanners.googleGdprChoiceCookieEventPbm.testGetValue().length, - TEST_CASES.length, - "The number of events is expected." - ); - - // We need to notify the "last-pb-context-exited" tp explicitly remove private - // cookies. Otherwise, the remaining private cookies could affect following - // tests. The SiteDataTestUtils.clear() doesn't clear for private cookies. - Services.obs.notifyObservers(null, "last-pb-context-exited"); -}); diff --git a/toolkit/components/protobuf/scripts/generate_files.py b/toolkit/components/protobuf/scripts/generate_files.py @@ -45,11 +45,6 @@ if __name__ == "__main__": includes=["toolkit/components/url-classifier/chromium/"], ) run_protoc( - "cookieBanner.proto", - cpp_out="toolkit/components/cookiebanners/", - includes=["toolkit/components/cookiebanners/"], - ) - run_protoc( "analysis.proto", cpp_out="toolkit/components/contentanalysis/content_analysis/sdk/", includes=["third_party/content_analysis_sdk/proto/content_analysis/sdk"], diff --git a/tools/@types/generated/lib.gecko.dom.d.ts b/tools/@types/generated/lib.gecko.dom.d.ts @@ -712,6 +712,7 @@ interface DecodedStreamDebugInfo { instance?: string; lastAudio?: number; lastOutputTime?: number; + lastReportedPosition?: number; playing?: number; startTime?: number; } @@ -1572,6 +1573,11 @@ interface ImageEncodeOptions { type?: string; } +interface ImageSize { + height: number; + width: number; +} + interface ImageText { confidence: number; quad: DOMQuad; @@ -3657,7 +3663,6 @@ interface RedirectBlockedEventInit extends EventInit { interface RegistrationOptions { scope?: string; - type?: WorkerType; updateViaCache?: ServiceWorkerUpdateViaCache; } @@ -13345,6 +13350,7 @@ interface ImageTrack { readonly frameCount: number; readonly repetitionCount: number; selected: boolean; + getSizes(): ImageSize[]; } declare var ImageTrack: { @@ -25872,6 +25878,8 @@ declare namespace CSS { declare namespace ChromeUtils { var aliveUtilityProcesses: number; + var cpuTimeSinceProcessStart: number; + var currentProcessMemoryUsage: number; var domProcessChild: nsIDOMProcessChild | null; var recentJSDevError: any; function CreateOriginAttributesFromOriginSuffix(suffix: string): OriginAttributesDictionary; diff --git a/tools/@types/generated/lib.gecko.glean.d.ts b/tools/@types/generated/lib.gecko.glean.d.ts @@ -3120,6 +3120,9 @@ interface GleanImpl { lenientThis: GleanCounter; mathMlDeprecatedMathSpaceValue2: GleanCounter; mathMlDeprecatedMathVariant: GleanCounter; + mathMlDeprecatedMoExplicitAccent: GleanCounter; + mathMlDeprecatedMoverNonExplicitAccent: GleanCounter; + mathMlDeprecatedMunderNonExplicitAccentunder: GleanCounter; motionEvent: GleanCounter; mouseEventMozPressure: GleanCounter; mozInputSource: GleanCounter; @@ -3168,6 +3171,9 @@ interface GleanImpl { lenientThis: GleanCounter; mathMlDeprecatedMathSpaceValue2: GleanCounter; mathMlDeprecatedMathVariant: GleanCounter; + mathMlDeprecatedMoExplicitAccent: GleanCounter; + mathMlDeprecatedMoverNonExplicitAccent: GleanCounter; + mathMlDeprecatedMunderNonExplicitAccentunder: GleanCounter; motionEvent: GleanCounter; mouseEventMozPressure: GleanCounter; mozInputSource: GleanCounter; @@ -5466,9 +5472,6 @@ interface GleanImpl { } cookieBanners: { - googleGdprChoiceCookie: Record<string, GleanString>; - googleGdprChoiceCookieEvent: GleanEventWithExtras<{ choice?: string, region?: string, search_domain?: string }>; - googleGdprChoiceCookieEventPbm: GleanEventWithExtras<{ choice?: string }>; normalWindowServiceMode: Record<"disabled"|"invalid"|"reject"|"reject_or_accept", GleanBoolean>; privateWindowServiceMode: Record<"disabled"|"invalid"|"reject"|"reject_or_accept", GleanBoolean>; serviceDetectOnly: GleanBoolean; @@ -5923,7 +5926,7 @@ interface GleanImpl { remoteSettingsSyncError: GleanEventWithExtras<{ collection?: string, force_sync?: string, reason?: string, trigger?: string }>; startupDatabaseConsistency: GleanEventWithExtras<{ db_active_count?: string, primary?: string, store_active_count?: string, total_db_count?: string, total_store_count?: string, trigger?: string }>; unenrollFailed: GleanEventWithExtras<{ experiment?: string, reason?: string }>; - unenrollment: GleanEventWithExtras<{ branch?: string, changed_pref?: string, conflicting_slug?: string, experiment?: string, locale?: string, pref_name?: string, pref_type?: string, reason?: string }>; + unenrollment: GleanEventWithExtras<{ about_config_change?: string, branch?: string, changed_pref?: string, conflicting_slug?: string, experiment?: string, locale?: string, pref_name?: string, pref_type?: string, reason?: string }>; validationFailed: GleanEventWithExtras<{ branch?: string, experiment?: string, l10n_ids?: string, locale?: string, reason?: string }>; } diff --git a/tools/@types/generated/lib.gecko.xpcom.d.ts b/tools/@types/generated/lib.gecko.xpcom.d.ts @@ -5879,6 +5879,7 @@ interface nsICacheInfoChannel extends nsISupports, Enums<typeof nsICacheInfoChan readonly cacheTokenFetchCount: u32; readonly cacheTokenExpirationTime: u32; isFromCache(): boolean; + hasCacheEntry(): boolean; isRacing(): boolean; getCacheEntryId(): u64; cacheKey: u32; @@ -6747,7 +6748,6 @@ interface nsINetworkLinkService extends nsISupports { // https://searchfox.org/mozilla-central/source/netwerk/base/nsINetworkPredictor.idl interface nsINetworkPredictor extends nsISupports { - readonly PREDICT_LINK?: 0; readonly PREDICT_LOAD?: 1; readonly PREDICT_STARTUP?: 2; readonly LEARN_LOAD_TOPLEVEL?: 0; @@ -6965,7 +6965,7 @@ interface nsIProtocolProxyService extends nsISupports { asyncResolve(aChannelOrURI: nsISupports, aFlags: u32, aCallback: nsIProtocolProxyCallback, aMainThreadTarget?: nsISerialEventTarget): nsICancelable; newProxyInfo(aType: string, aHost: string, aPort: i32, aProxyAuthorizationHeader: string, aConnectionIsolationKey: string, aFlags: u32, aFailoverTimeout: u32, aFailoverProxy: nsIProxyInfo): nsIProxyInfo; newProxyInfoWithAuth(aType: string, aHost: string, aPort: i32, aUsername: string, aPassword: string, aProxyAuthorizationHeader: string, aConnectionIsolationKey: string, aFlags: u32, aFailoverTimeout: u32, aFailoverProxy: nsIProxyInfo): nsIProxyInfo; - newMASQUEProxyInfo(aHost: string, aPort: i32, aPathTemplate: string, aProxyAuthorizationHeader: string, aConnectionIsolationKey: string, aFlags: u32, aFailoverTimeout: u32, aFailoverProxy: nsIProxyInfo): nsIProxyInfo; + newMASQUEProxyInfo(aHost: string, aPort: i32, aMasqueTemplate: string, aProxyAuthorizationHeader: string, aConnectionIsolationKey: string, aFlags: u32, aFailoverTimeout: u32, aFailoverProxy: nsIProxyInfo): nsIProxyInfo; getFailoverForProxy(aProxyInfo: nsIProxyInfo, aURI: nsIURI, aReason: nsresult): nsIProxyInfo; registerFilter(aFilter: nsIProtocolProxyFilter, aPosition: u32): void; registerChannelFilter(aFilter: nsIProtocolProxyChannelFilter, aPosition: u32): void; @@ -7017,7 +7017,7 @@ interface nsIProxyInfo extends nsISupports { sourceId: string; readonly proxyAuthorizationHeader: string; readonly connectionIsolationKey: string; - pathTemplate: string; + masqueTemplate: string; } // https://searchfox.org/mozilla-central/source/netwerk/base/nsIRandomGenerator.idl @@ -8887,6 +8887,17 @@ interface nsIWebTransportHash extends nsISupports { readonly value: u8[]; } +// https://searchfox.org/mozilla-central/source/netwerk/protocol/webtransport/nsIWebTransportEventService.idl + +interface nsIWebTransportEventListener extends nsISupports { +} + +interface nsIWebTransportEventService extends nsISupports { + addListener(aInnerWindowID: u64, aListener: nsIWebTransportEventListener): void; + removeListener(aInnerWindowID: u64, aListener: nsIWebTransportEventListener): void; + hasListenerFor(aInnerWindowID: u64): boolean; +} + // https://searchfox.org/mozilla-central/source/netwerk/protocol/webtransport/nsIWebTransportStream.idl interface nsIWebTransportSendStreamStats extends nsISupports { @@ -10085,7 +10096,7 @@ namespace nsINavHistoryService { } interface nsINavHistoryService extends nsISupports, Enums<typeof nsINavHistoryService_TransitionType> { - readonly DATABASE_SCHEMA_VERSION?: 82; + readonly DATABASE_SCHEMA_VERSION?: 83; readonly DATABASE_STATUS_OK?: 0; readonly DATABASE_STATUS_CREATE?: 1; readonly DATABASE_STATUS_CORRUPT?: 2; @@ -10110,7 +10121,6 @@ interface nsINavHistoryService extends nsISupports, Enums<typeof nsINavHistorySe makeGuid(): string; pageFrecencyThreshold(aVisitAgeInDays: i32, aNumVisits: i32, aBookmarked: boolean): i64; hashURL(aSpec: string, aMode?: string): u64; - isFrecencyDecaying: boolean; readonly isAlternativeFrecencyEnabled: boolean; shouldStartFrecencyRecalculation: boolean; readonly DBConnection: mozIStorageConnection; @@ -11473,11 +11483,6 @@ interface nsICookieBannerService extends nsISupports, Enums<typeof nsICookieBann removeAllExecutedRecords(aIsPrivate: boolean): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerTelemetryService.idl - -interface nsICookieBannerTelemetryService extends nsISupports { -} - // https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieRule.idl interface nsICookieRule extends nsISupports { @@ -16094,6 +16099,8 @@ interface nsIXPCComponents_Interfaces { WebTransportSessionEventListener: nsJSIID<WebTransportSessionEventListener, typeof WebTransportSessionEventListener_DatagramOutcome>; nsIWebTransportStreamCallback: nsJSIID<nsIWebTransportStreamCallback>; nsIWebTransportHash: nsJSIID<nsIWebTransportHash>; + nsIWebTransportEventListener: nsJSIID<nsIWebTransportEventListener>; + nsIWebTransportEventService: nsJSIID<nsIWebTransportEventService>; nsIWebTransportSendStreamStats: nsJSIID<nsIWebTransportSendStreamStats>; nsIWebTransportReceiveStreamStats: nsJSIID<nsIWebTransportReceiveStreamStats>; nsIWebTransportStreamStatsCallback: nsJSIID<nsIWebTransportStreamStatsCallback>; @@ -16271,7 +16278,6 @@ interface nsIXPCComponents_Interfaces { nsICookieBannerListService: nsJSIID<nsICookieBannerListService>; nsICookieBannerRule: nsJSIID<nsICookieBannerRule>; nsICookieBannerService: nsJSIID<nsICookieBannerService, typeof nsICookieBannerService_Modes>; - nsICookieBannerTelemetryService: nsJSIID<nsICookieBannerTelemetryService>; nsICookieRule: nsJSIID<nsICookieRule>; nsICrashService: nsJSIID<nsICrashService>; nsIFinalizationWitnessService: nsJSIID<nsIFinalizationWitnessService>;