123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- // Copyright 2012 The Chromium Authors. All rights reserved.
- // 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/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/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/sync.pb.h"
- #include "components/sync/protocol/sync_enums.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_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::BookmarkSpecifics::Type type);
- const char* ProtoEnumToString(
- sync_pb::CommitResponse::ResponseType response_type);
- const char* ProtoEnumToString(
- sync_pb::ContactInfoSpecifics::VerificationStatus verification_status);
- const char* ProtoEnumToString(
- sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source);
- const char* ProtoEnumToString(sync_pb::NigoriSpecifics::PassphraseType type);
- const char* ProtoEnumToString(
- sync_pb::ReadingListSpecifics::ReadingListEntryStatus status);
- const char* ProtoEnumToString(sync_pb::SavedTabGroup::SavedTabGroupColor 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::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::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);
- // TODO(markusheintz): Remove.
- const char* ProtoEnumToString(
- sync_pb::GaiaPasswordReuse::PasswordCaptured::EventTrigger trigger);
- const char* ProtoEnumToString(
- sync_pb::UserEventSpecifics::GaiaPasswordCaptured::EventTrigger trigger);
- const char* ProtoEnumToString(
- sync_pb::UserEventSpecifics::FlocIdComputed::EventTrigger trigger);
- const char* ProtoEnumToString(
- sync_pb::WalletMaskedCreditCard::VirtualCardEnrollmentState
- virtual_card_enrollment_state);
- 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::CardIssuer::Issuer issuer);
- const char* ProtoEnumToString(
- sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type);
- 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);
- } // namespace syncer
- #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
|