OLD | NEW |
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC); | 134 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC); |
135 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT); | 135 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT); |
136 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION); | 136 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION); |
137 } | 137 } |
138 NOTREACHED(); | 138 NOTREACHED(); |
139 return ""; | 139 return ""; |
140 | 140 |
141 } | 141 } |
142 | 142 |
143 const char* GetDeviceTypeString( | 143 const char* GetDeviceTypeString( |
144 sync_pb::SessionHeader::DeviceType device_type) { | 144 sync_pb::SyncEnums::DeviceType device_type) { |
145 ASSERT_ENUM_BOUNDS(sync_pb::SessionHeader, DeviceType, TYPE_WIN, TYPE_TABLET); | 145 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET); |
146 switch (device_type) { | 146 switch (device_type) { |
147 ENUM_CASE(sync_pb::SessionHeader, TYPE_WIN); | 147 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN); |
148 ENUM_CASE(sync_pb::SessionHeader, TYPE_MAC); | 148 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC); |
149 ENUM_CASE(sync_pb::SessionHeader, TYPE_LINUX); | 149 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX); |
150 ENUM_CASE(sync_pb::SessionHeader, TYPE_CROS); | 150 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS); |
151 ENUM_CASE(sync_pb::SessionHeader, TYPE_OTHER); | 151 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER); |
152 ENUM_CASE(sync_pb::SessionHeader, TYPE_PHONE); | 152 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE); |
153 ENUM_CASE(sync_pb::SessionHeader, TYPE_TABLET); | 153 ENUM_CASE(sync_pb::SyncEnums, TYPE_TABLET); |
154 } | 154 } |
155 NOTREACHED(); | 155 NOTREACHED(); |
156 return ""; | 156 return ""; |
157 } | 157 } |
158 | 158 |
159 const char* GetFaviconTypeString( | 159 const char* GetFaviconTypeString( |
160 sync_pb::SessionTab::FaviconType favicon_type) { | 160 sync_pb::SessionTab::FaviconType favicon_type) { |
161 ASSERT_ENUM_BOUNDS(sync_pb::SessionTab, FaviconType, TYPE_WEB_FAVICON, | 161 ASSERT_ENUM_BOUNDS(sync_pb::SessionTab, FaviconType, TYPE_WEB_FAVICON, |
162 TYPE_WEB_FAVICON); | 162 TYPE_WEB_FAVICON); |
163 switch (favicon_type) { | 163 switch (favicon_type) { |
164 ENUM_CASE(sync_pb::SessionTab, TYPE_WEB_FAVICON); | 164 ENUM_CASE(sync_pb::SessionTab, TYPE_WEB_FAVICON); |
165 } | 165 } |
166 NOTREACHED(); | 166 NOTREACHED(); |
167 return ""; | 167 return ""; |
168 } | 168 } |
169 | 169 |
170 #undef ASSERT_ENUM_BOUNDS | 170 #undef ASSERT_ENUM_BOUNDS |
171 #undef ENUM_CASE | 171 #undef ENUM_CASE |
172 | 172 |
173 } // namespace syncer | 173 } // namespace syncer |
OLD | NEW |