| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 const char* PassphraseTypeString( |
| 171 sync_pb::NigoriSpecifics::PassphraseType type) { |
| 172 ASSERT_ENUM_BOUNDS(sync_pb::NigoriSpecifics, PassphraseType, |
| 173 IMPLICIT_PASSPHRASE, CUSTOM_PASSPHRASE); |
| 174 switch (type) { |
| 175 ENUM_CASE(sync_pb::NigoriSpecifics, IMPLICIT_PASSPHRASE); |
| 176 ENUM_CASE(sync_pb::NigoriSpecifics, KEYSTORE_PASSPHRASE); |
| 177 ENUM_CASE(sync_pb::NigoriSpecifics, FROZEN_IMPLICIT_PASSPHRASE); |
| 178 ENUM_CASE(sync_pb::NigoriSpecifics, CUSTOM_PASSPHRASE); |
| 179 } |
| 180 NOTREACHED(); |
| 181 return ""; |
| 182 } |
| 183 |
| 170 #undef ASSERT_ENUM_BOUNDS | 184 #undef ASSERT_ENUM_BOUNDS |
| 171 #undef ENUM_CASE | 185 #undef ENUM_CASE |
| 172 | 186 |
| 173 } // namespace syncer | 187 } // namespace syncer |
| OLD | NEW |