1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
|
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
#define COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
#include "components/sync/protocol/app_list_specifics.pb.h"
#include "components/sync/protocol/app_specifics.pb.h"
#include "components/sync/protocol/autofill_specifics.pb.h"
#include "components/sync/protocol/contact_info_specifics.pb.h"
#include "components/sync/protocol/cookie_specifics.pb.h"
#include "components/sync/protocol/data_type_state.pb.h"
#include "components/sync/protocol/gaia_password_reuse.pb.h"
#include "components/sync/protocol/get_updates_caller_info.pb.h"
#include "components/sync/protocol/nigori_specifics.pb.h"
#include "components/sync/protocol/note_entity.pb.h"
#include "components/sync/protocol/power_bookmark_specifics.pb.h"
#include "components/sync/protocol/proto_value_conversions.h"
#include "components/sync/protocol/reading_list_specifics.pb.h"
#include "components/sync/protocol/saved_tab_group_specifics.pb.h"
#include "components/sync/protocol/session_specifics.pb.h"
#include "components/sync/protocol/shared_tab_group_data_specifics.pb.h"
#include "components/sync/protocol/sharing_message_specifics.pb.h"
#include "components/sync/protocol/sync.pb.h"
#include "components/sync/protocol/sync_enums.pb.h"
#include "components/sync/protocol/theme_types.pb.h"
#include "components/sync/protocol/user_consent_types.pb.h"
#include "components/sync/protocol/user_event_specifics.pb.h"
#include "components/sync/protocol/web_apk_specifics.pb.h"
#include "components/sync/protocol/web_app_specifics.pb.h"
#include "components/sync/protocol/wifi_configuration_specifics.pb.h"
#include "components/sync/protocol/workspace_desk_specifics.pb.h"
// Keep this file in sync with the .proto files in this directory.
//
// Utility functions to get the string equivalent for some sync proto
// enums.
namespace syncer {
// The returned strings (which don't have to be freed) are in ASCII.
// The result of passing in an invalid enum value is undefined.
const char* ProtoEnumToString(
sync_pb::AppListSpecifics::AppListItemType item_type);
const char* ProtoEnumToString(sync_pb::AppSpecifics::LaunchType launch_type);
const char* ProtoEnumToString(
sync_pb::AutofillWalletSpecifics::WalletInfoType wallet_info_type);
const char* ProtoEnumToString(
sync_pb::BankAccountDetails::AccountType account_type);
const char* ProtoEnumToString(sync_pb::BookmarkSpecifics::Type type);
const char* ProtoEnumToString(
sync_pb::CommitResponse::ResponseType response_type);
const char* ProtoEnumToString(
sync_pb::ContactInfoSpecifics::AddressType address_type);
const char* ProtoEnumToString(
sync_pb::ContactInfoSpecifics::VerificationStatus verification_status);
const char* ProtoEnumToString(
sync_pb::TrustedVaultAutoUpgradeExperimentGroup::Type type);
const char* ProtoEnumToString(sync_pb::NigoriSpecifics::PassphraseType type);
const char* ProtoEnumToString(
sync_pb::PaymentInstrument::SupportedRail supported_rail);
const char* ProtoEnumToString(
sync_pb::PaymentInstrument::ActionRequired action_required);
const char* ProtoEnumToString(
sync_pb::PowerBookmarkSpecifics::PowerType power_type);
const char* ProtoEnumToString(sync_pb::NoteEntity::TargetType target_type);
const char* ProtoEnumToString(
sync_pb::ReadingListSpecifics::ReadingListEntryStatus status);
const char* ProtoEnumToString(sync_pb::SavedTabGroup::SavedTabGroupColor color);
const char* ProtoEnumToString(sync_pb::SharedTabGroup::Color color);
const char* ProtoEnumToString(
sync_pb::SearchEngineSpecifics::ActiveStatus is_active);
const char* ProtoEnumToString(sync_pb::SessionTab::FaviconType favicon_type);
const char* ProtoEnumToString(sync_pb::SyncEnums::BrowserType browser_type);
const char* ProtoEnumToString(sync_pb::SyncEnums::Action action);
const char* ProtoEnumToString(sync_pb::SyncEnums::DeviceType device_type);
const char* ProtoEnumToString(sync_pb::SyncEnums::OsType os_type);
const char* ProtoEnumToString(
sync_pb::SyncEnums::DeviceFormFactor device_form_factor);
const char* ProtoEnumToString(sync_pb::SyncEnums::ErrorType error_type);
const char* ProtoEnumToString(sync_pb::SyncEnums::GetUpdatesOrigin origin);
const char* ProtoEnumToString(
sync_pb::SyncEnums::PageTransition page_transition);
const char* ProtoEnumToString(
sync_pb::SyncEnums::PageTransitionRedirectType redirect_type);
const char* ProtoEnumToString(
sync_pb::SyncEnums::SendTabReceivingType send_tab_receiving_type);
const char* ProtoEnumToString(sync_pb::SyncEnums::SingletonDebugEventType type);
const char* ProtoEnumToString(sync_pb::TabNavigation::BlockedState state);
const char* ProtoEnumToString(sync_pb::SyncEnums::PasswordState state);
const char* ProtoEnumToString(sync_pb::UserConsentTypes::ConsentStatus status);
const char* ProtoEnumToString(
sync_pb::GaiaPasswordReuse::PasswordReuseDetected::SafeBrowsingStatus::
ReportingPopulation safe_browsing_reporting_population);
const char* ProtoEnumToString(
sync_pb::GaiaPasswordReuse::PasswordReuseDialogInteraction::
InteractionResult interaction_result);
const char* ProtoEnumToString(
sync_pb::GaiaPasswordReuse::PasswordReuseLookup::LookupResult
lookup_result);
const char* ProtoEnumToString(
sync_pb::GaiaPasswordReuse::PasswordReuseLookup::ReputationVerdict verdict);
const char* ProtoEnumToString(
sync_pb::UserEventSpecifics::GaiaPasswordCaptured::EventTrigger trigger);
const char* ProtoEnumToString(
sync_pb::UserEventSpecifics::FlocIdComputed::EventTrigger trigger);
const char* ProtoEnumToString(
sync_pb::WalletMaskedCreditCard::CardInfoRetrievalEnrollmentState
card_info_retrieval_enrollment_state);
const char* ProtoEnumToString(
sync_pb::WalletMaskedCreditCard::CardBenefitSource
card_benefit_source);
const char* ProtoEnumToString(
sync_pb::WalletMaskedCreditCard::VirtualCardEnrollmentState
virtual_card_enrollment_state);
const char* ProtoEnumToString(
sync_pb::WalletMaskedCreditCard::VirtualCardEnrollmentType
virtual_card_enrollment_type);
const char* ProtoEnumToString(
sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status);
const char* ProtoEnumToString(
sync_pb::WalletMaskedCreditCard::WalletCardType wallet_card_type);
const char* ProtoEnumToString(
sync_pb::CardBenefit::CategoryBenefitType category_benefit_type);
const char* ProtoEnumToString(sync_pb::CardIssuer::Issuer issuer);
const char* ProtoEnumToString(
sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type);
const char* ProtoEnumToString(sync_pb::WebApkIconInfo::Purpose purpose);
const char* ProtoEnumToString(sync_pb::WebAppIconInfo::Purpose purpose);
const char* ProtoEnumToString(
sync_pb::WebAppSpecifics::UserDisplayMode user_display_mode);
const char* ProtoEnumToString(
sync_pb::AutofillProfileSpecifics::VerificationStatus status);
const char* ProtoEnumToString(
sync_pb::WifiConfigurationSpecifics::SecurityType security_type);
const char* ProtoEnumToString(
sync_pb::WifiConfigurationSpecifics::AutomaticallyConnectOption
automatically_connect_option);
const char* ProtoEnumToString(
sync_pb::WifiConfigurationSpecifics::IsPreferredOption is_preferred_option);
const char* ProtoEnumToString(
sync_pb::WifiConfigurationSpecifics::MeteredOption metered_option);
const char* ProtoEnumToString(
sync_pb::WifiConfigurationSpecifics::ProxyConfiguration::ProxyOption
proxy_option);
const char* ProtoEnumToString(
sync_pb::WorkspaceDeskSpecifics::WindowState window_state);
const char* ProtoEnumToString(
sync_pb::WorkspaceDeskSpecifics::LaunchContainer container);
const char* ProtoEnumToString(
sync_pb::WorkspaceDeskSpecifics::WindowOpenDisposition disposition);
const char* ProtoEnumToString(
sync_pb::UserConsentTypes::AssistantActivityControlConsent::SettingType
setting_type);
const char* ProtoEnumToString(sync_pb::WorkspaceDeskSpecifics::DeskType type);
const char* ProtoEnumToString(
sync_pb::WorkspaceDeskSpecifics::TabGroupColor color);
const char* ProtoEnumToString(sync_pb::DataTypeState::InitialSyncState state);
const char* ProtoEnumToString(
sync_pb::CookieSpecifics::CookieSameSite site_restrictions);
const char* ProtoEnumToString(
sync_pb::CookieSpecifics::CookiePriority priority);
const char* ProtoEnumToString(
sync_pb::CookieSpecifics::CookieSourceScheme source_scheme);
const char* ProtoEnumToString(
sync_pb::CookieSpecifics::CookieSourceType source_type);
const char* ProtoEnumToString(
sync_pb::SharingMessageSpecifics::ChannelConfiguration::
ChimeChannelConfiguration::ChimeChannelType channel_type);
const char* ProtoEnumToString(
sync_pb::UserColorTheme::BrowserColorVariant browser_color_variant);
const char* ProtoEnumToString(
sync_pb::ThemeSpecifics::BrowserColorScheme browser_color_scheme);
} // namespace syncer
#endif // COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
|