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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 ENUM_CASE(sync_pb::SyncEnums, ENABLE_SYNC_ON_ACCOUNT); | 163 ENUM_CASE(sync_pb::SyncEnums, ENABLE_SYNC_ON_ACCOUNT); |
164 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC); | 164 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC); |
165 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT); | 165 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT); |
166 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION); | 166 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION); |
167 } | 167 } |
168 NOTREACHED(); | 168 NOTREACHED(); |
169 return ""; | 169 return ""; |
170 | 170 |
171 } | 171 } |
172 | 172 |
| 173 const char* GetLaunchTypeString(sync_pb::AppSpecifics::LaunchType launch_type) { |
| 174 ASSERT_ENUM_BOUNDS(sync_pb::AppSpecifics, LaunchType, PINNED, WINDOW); |
| 175 switch (launch_type) { |
| 176 ENUM_CASE(sync_pb::AppSpecifics, PINNED); |
| 177 ENUM_CASE(sync_pb::AppSpecifics, REGULAR); |
| 178 ENUM_CASE(sync_pb::AppSpecifics, FULLSCREEN); |
| 179 ENUM_CASE(sync_pb::AppSpecifics, WINDOW); |
| 180 } |
| 181 NOTREACHED(); |
| 182 return ""; |
| 183 } |
| 184 |
173 const char* GetDeviceTypeString( | 185 const char* GetDeviceTypeString( |
174 sync_pb::SyncEnums::DeviceType device_type) { | 186 sync_pb::SyncEnums::DeviceType device_type) { |
175 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET); | 187 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET); |
176 switch (device_type) { | 188 switch (device_type) { |
177 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN); | 189 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN); |
178 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC); | 190 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC); |
179 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX); | 191 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX); |
180 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS); | 192 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS); |
181 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER); | 193 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER); |
182 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE); | 194 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED); | 255 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED); |
244 } | 256 } |
245 NOTREACHED(); | 257 NOTREACHED(); |
246 return ""; | 258 return ""; |
247 } | 259 } |
248 | 260 |
249 #undef ASSERT_ENUM_BOUNDS | 261 #undef ASSERT_ENUM_BOUNDS |
250 #undef ENUM_CASE | 262 #undef ENUM_CASE |
251 | 263 |
252 } // namespace syncer | 264 } // namespace syncer |
OLD | NEW |