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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 sync_pb::SessionTab::FaviconType favicon_type) { | 158 sync_pb::SessionTab::FaviconType favicon_type) { |
159 ASSERT_ENUM_BOUNDS(sync_pb::SessionTab, FaviconType, TYPE_WEB_FAVICON, | 159 ASSERT_ENUM_BOUNDS(sync_pb::SessionTab, FaviconType, TYPE_WEB_FAVICON, |
160 TYPE_WEB_FAVICON); | 160 TYPE_WEB_FAVICON); |
161 switch (favicon_type) { | 161 switch (favicon_type) { |
162 ENUM_CASE(sync_pb::SessionTab, TYPE_WEB_FAVICON); | 162 ENUM_CASE(sync_pb::SessionTab, TYPE_WEB_FAVICON); |
163 } | 163 } |
164 NOTREACHED(); | 164 NOTREACHED(); |
165 return ""; | 165 return ""; |
166 } | 166 } |
167 | 167 |
| 168 const char* GetIconTypeString( |
| 169 sync_pb::FaviconData::IconType icon_type) { |
| 170 ASSERT_ENUM_BOUNDS(sync_pb::FaviconData, IconType, FAVICON, |
| 171 TOUCH_PRECOMPOSED_ICON); |
| 172 switch (icon_type) { |
| 173 ENUM_CASE(sync_pb::FaviconData, FAVICON); |
| 174 ENUM_CASE(sync_pb::FaviconData, TOUCH_ICON); |
| 175 ENUM_CASE(sync_pb::FaviconData, TOUCH_PRECOMPOSED_ICON); |
| 176 } |
| 177 NOTREACHED(); |
| 178 return ""; |
| 179 } |
| 180 |
168 const char* PassphraseTypeString( | 181 const char* PassphraseTypeString( |
169 sync_pb::NigoriSpecifics::PassphraseType type) { | 182 sync_pb::NigoriSpecifics::PassphraseType type) { |
170 ASSERT_ENUM_BOUNDS(sync_pb::NigoriSpecifics, PassphraseType, | 183 ASSERT_ENUM_BOUNDS(sync_pb::NigoriSpecifics, PassphraseType, |
171 IMPLICIT_PASSPHRASE, CUSTOM_PASSPHRASE); | 184 IMPLICIT_PASSPHRASE, CUSTOM_PASSPHRASE); |
172 switch (type) { | 185 switch (type) { |
173 ENUM_CASE(sync_pb::NigoriSpecifics, IMPLICIT_PASSPHRASE); | 186 ENUM_CASE(sync_pb::NigoriSpecifics, IMPLICIT_PASSPHRASE); |
174 ENUM_CASE(sync_pb::NigoriSpecifics, KEYSTORE_PASSPHRASE); | 187 ENUM_CASE(sync_pb::NigoriSpecifics, KEYSTORE_PASSPHRASE); |
175 ENUM_CASE(sync_pb::NigoriSpecifics, FROZEN_IMPLICIT_PASSPHRASE); | 188 ENUM_CASE(sync_pb::NigoriSpecifics, FROZEN_IMPLICIT_PASSPHRASE); |
176 ENUM_CASE(sync_pb::NigoriSpecifics, CUSTOM_PASSPHRASE); | 189 ENUM_CASE(sync_pb::NigoriSpecifics, CUSTOM_PASSPHRASE); |
177 } | 190 } |
(...skipping 21 matching lines...) Expand all Loading... |
199 ENUM_CASE(sync_pb::DebugEventInfo, BOOTSTRAP_TOKEN_UPDATED); | 212 ENUM_CASE(sync_pb::DebugEventInfo, BOOTSTRAP_TOKEN_UPDATED); |
200 } | 213 } |
201 NOTREACHED(); | 214 NOTREACHED(); |
202 return ""; | 215 return ""; |
203 } | 216 } |
204 | 217 |
205 #undef ASSERT_ENUM_BOUNDS | 218 #undef ASSERT_ENUM_BOUNDS |
206 #undef ENUM_CASE | 219 #undef ENUM_CASE |
207 | 220 |
208 } // namespace syncer | 221 } // namespace syncer |
OLD | NEW |