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

Side by Side Diff: sync/protocol/proto_enum_conversions.cc

Issue 1140653006: [sync] Add WalletMetadataSpecifics protobuf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work Created 5 years, 7 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 | « sync/protocol/proto_enum_conversions.h ('k') | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // Keep this file in sync with the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #include "sync/protocol/proto_enum_conversions.h" 7 #include "sync/protocol/proto_enum_conversions.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 UNKNOWN, POSTAL_ADDRESS); 207 UNKNOWN, POSTAL_ADDRESS);
208 switch (wallet_info_type) { 208 switch (wallet_info_type) {
209 ENUM_CASE(sync_pb::AutofillWalletSpecifics, UNKNOWN); 209 ENUM_CASE(sync_pb::AutofillWalletSpecifics, UNKNOWN);
210 ENUM_CASE(sync_pb::AutofillWalletSpecifics, MASKED_CREDIT_CARD); 210 ENUM_CASE(sync_pb::AutofillWalletSpecifics, MASKED_CREDIT_CARD);
211 ENUM_CASE(sync_pb::AutofillWalletSpecifics, POSTAL_ADDRESS); 211 ENUM_CASE(sync_pb::AutofillWalletSpecifics, POSTAL_ADDRESS);
212 } 212 }
213 NOTREACHED(); 213 NOTREACHED();
214 return ""; 214 return "";
215 } 215 }
216 216
217 const char* GetWalletMetadataTypeString(
218 sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type) {
219 ASSERT_ENUM_BOUNDS(sync_pb::WalletMetadataSpecifics, Type, UNKNOWN, ADDRESS);
220 switch (wallet_metadata_type) {
221 ENUM_CASE(sync_pb::WalletMetadataSpecifics, UNKNOWN);
222 ENUM_CASE(sync_pb::WalletMetadataSpecifics, CARD);
223 ENUM_CASE(sync_pb::WalletMetadataSpecifics, ADDRESS);
224 }
225 NOTREACHED();
226 return "";
227 }
228
217 const char* GetWalletCardStatusString( 229 const char* GetWalletCardStatusString(
218 sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status) { 230 sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status) {
219 switch (wallet_card_status) { 231 switch (wallet_card_status) {
220 ENUM_CASE(sync_pb::WalletMaskedCreditCard, VALID); 232 ENUM_CASE(sync_pb::WalletMaskedCreditCard, VALID);
221 ENUM_CASE(sync_pb::WalletMaskedCreditCard, EXPIRED); 233 ENUM_CASE(sync_pb::WalletMaskedCreditCard, EXPIRED);
222 } 234 }
223 NOTREACHED(); 235 NOTREACHED();
224 return ""; 236 return "";
225 } 237 }
226 238
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED); 326 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED);
315 } 327 }
316 NOTREACHED(); 328 NOTREACHED();
317 return ""; 329 return "";
318 } 330 }
319 331
320 #undef ASSERT_ENUM_BOUNDS 332 #undef ASSERT_ENUM_BOUNDS
321 #undef ENUM_CASE 333 #undef ENUM_CASE
322 334
323 } // namespace syncer 335 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_enum_conversions.h ('k') | sync/protocol/proto_value_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698