Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: components/sync/protocol/proto_enum_conversions.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/sync/protocol/BUILD.gn ('k') | components/sync/protocol/proto_value_conversions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ 5 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ 6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
7 7
8 // Keep this file in sync with the .proto files in this directory. 8 // Keep this file in sync with the .proto files in this directory.
9 9
10 #include "components/sync/base/sync_export.h"
11 #include "components/sync/protocol/app_list_specifics.pb.h" 10 #include "components/sync/protocol/app_list_specifics.pb.h"
12 #include "components/sync/protocol/app_specifics.pb.h" 11 #include "components/sync/protocol/app_specifics.pb.h"
13 #include "components/sync/protocol/client_debug_info.pb.h" 12 #include "components/sync/protocol/client_debug_info.pb.h"
14 #include "components/sync/protocol/session_specifics.pb.h" 13 #include "components/sync/protocol/session_specifics.pb.h"
15 #include "components/sync/protocol/sync.pb.h" 14 #include "components/sync/protocol/sync.pb.h"
16 15
17 // Utility functions to get the string equivalent for some sync proto 16 // Utility functions to get the string equivalent for some sync proto
18 // enums. 17 // enums.
19 18
20 namespace syncer { 19 namespace syncer {
21 20
22 // The returned strings (which don't have to be freed) are in ASCII. 21 // The returned strings (which don't have to be freed) are in ASCII.
23 // The result of passing in an invalid enum value is undefined. 22 // The result of passing in an invalid enum value is undefined.
24 23
25 SYNC_EXPORT const char* GetAppListItemTypeString( 24 const char* GetAppListItemTypeString(
26 sync_pb::AppListSpecifics::AppListItemType item_type); 25 sync_pb::AppListSpecifics::AppListItemType item_type);
27 26
28 SYNC_EXPORT const char* GetBrowserTypeString( 27 const char* GetBrowserTypeString(
29 sync_pb::SessionWindow::BrowserType browser_type); 28 sync_pb::SessionWindow::BrowserType browser_type);
30 29
31 SYNC_EXPORT const char* GetPageTransitionString( 30 const char* GetPageTransitionString(
32 sync_pb::SyncEnums::PageTransition page_transition); 31 sync_pb::SyncEnums::PageTransition page_transition);
33 32
34 SYNC_EXPORT const char* GetPageTransitionRedirectTypeString( 33 const char* GetPageTransitionRedirectTypeString(
35 sync_pb::SyncEnums::PageTransitionRedirectType redirect_type); 34 sync_pb::SyncEnums::PageTransitionRedirectType redirect_type);
36 35
37 SYNC_EXPORT const char* GetWifiCredentialSecurityClassString( 36 const char* GetWifiCredentialSecurityClassString(
38 sync_pb::WifiCredentialSpecifics::SecurityClass security_class); 37 sync_pb::WifiCredentialSpecifics::SecurityClass security_class);
39 38
40 SYNC_EXPORT const char* GetUpdatesSourceString( 39 const char* GetUpdatesSourceString(
41 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source); 40 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source);
42 41
43 SYNC_EXPORT const char* GetUpdatesOriginString( 42 const char* GetUpdatesOriginString(sync_pb::SyncEnums::GetUpdatesOrigin origin);
44 sync_pb::SyncEnums::GetUpdatesOrigin origin);
45 43
46 SYNC_EXPORT const char* GetResponseTypeString( 44 const char* GetResponseTypeString(
47 sync_pb::CommitResponse::ResponseType response_type); 45 sync_pb::CommitResponse::ResponseType response_type);
48 46
49 SYNC_EXPORT const char* GetErrorTypeString( 47 const char* GetErrorTypeString(sync_pb::SyncEnums::ErrorType error_type);
50 sync_pb::SyncEnums::ErrorType error_type);
51 48
52 SYNC_EXPORT const char* GetActionString(sync_pb::SyncEnums::Action action); 49 const char* GetActionString(sync_pb::SyncEnums::Action action);
53 50
54 SYNC_EXPORT const char* GetLaunchTypeString( 51 const char* GetLaunchTypeString(sync_pb::AppSpecifics::LaunchType launch_type);
55 sync_pb::AppSpecifics::LaunchType launch_type);
56 52
57 SYNC_EXPORT const char* GetWalletInfoTypeString( 53 const char* GetWalletInfoTypeString(
58 sync_pb::AutofillWalletSpecifics::WalletInfoType wallet_info_type); 54 sync_pb::AutofillWalletSpecifics::WalletInfoType wallet_info_type);
59 55
60 SYNC_EXPORT const char* GetWalletMetadataTypeString( 56 const char* GetWalletMetadataTypeString(
61 sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type); 57 sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type);
62 58
63 SYNC_EXPORT const char* GetWalletCardStatusString( 59 const char* GetWalletCardStatusString(
64 sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status); 60 sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status);
65 61
66 SYNC_EXPORT const char* GetWalletCardTypeString( 62 const char* GetWalletCardTypeString(
67 sync_pb::WalletMaskedCreditCard::WalletCardType wallet_card_type); 63 sync_pb::WalletMaskedCreditCard::WalletCardType wallet_card_type);
68 64
69 const char* GetDeviceTypeString(sync_pb::SyncEnums::DeviceType device_type); 65 const char* GetDeviceTypeString(sync_pb::SyncEnums::DeviceType device_type);
70 66
71 const char* GetFaviconTypeString(sync_pb::SessionTab::FaviconType favicon_type); 67 const char* GetFaviconTypeString(sync_pb::SessionTab::FaviconType favicon_type);
72 68
73 const char* PassphraseTypeString(sync_pb::NigoriSpecifics::PassphraseType type); 69 const char* PassphraseTypeString(sync_pb::NigoriSpecifics::PassphraseType type);
74 70
75 const char* SingletonDebugEventTypeString( 71 const char* SingletonDebugEventTypeString(
76 sync_pb::SyncEnums::SingletonDebugEventType type); 72 sync_pb::SyncEnums::SingletonDebugEventType type);
77 73
78 const char* GetBlockedStateString(sync_pb::TabNavigation::BlockedState state); 74 const char* GetBlockedStateString(sync_pb::TabNavigation::BlockedState state);
79 75
80 } // namespace syncer 76 } // namespace syncer
81 77
82 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ 78 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
OLDNEW
« no previous file with comments | « components/sync/protocol/BUILD.gn ('k') | components/sync/protocol/proto_value_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698