OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/protocol/proto_enum_conversions.h" | 7 #include "chrome/browser/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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, CLEAR_PRIVATE_DATA); | 82 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, CLEAR_PRIVATE_DATA); |
83 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, NEWLY_SUPPORTED_DATATYPE); | 83 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, NEWLY_SUPPORTED_DATATYPE); |
84 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, MIGRATION); | 84 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, MIGRATION); |
85 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, NEW_CLIENT); | 85 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, NEW_CLIENT); |
86 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, RECONFIGURATION); | 86 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, RECONFIGURATION); |
87 } | 87 } |
88 NOTREACHED(); | 88 NOTREACHED(); |
89 return ""; | 89 return ""; |
90 } | 90 } |
91 | 91 |
| 92 const char* GetDeviceTypeString( |
| 93 sync_pb::SessionHeader::DeviceType device_type) { |
| 94 ASSERT_ENUM_BOUNDS(sync_pb::SessionHeader, DeviceType, TYPE_PC, TYPE_CROS); |
| 95 switch (device_type) { |
| 96 ENUM_CASE(sync_pb::SessionHeader, TYPE_PC); |
| 97 ENUM_CASE(sync_pb::SessionHeader, TYPE_CROS); |
| 98 } |
| 99 NOTREACHED(); |
| 100 return ""; |
| 101 } |
| 102 |
92 #undef ASSERT_ENUM_BOUNDS | 103 #undef ASSERT_ENUM_BOUNDS |
93 #undef ENUM_CASE | 104 #undef ENUM_CASE |
94 | 105 |
95 } // namespace | 106 } // namespace |
OLD | NEW |