| 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 #include "components/sync/protocol/proto_enum_conversions.h" | 5 #include "components/sync/protocol/proto_enum_conversions.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace syncer { | 9 namespace syncer { |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 ENUM_CASE(sync_pb::AppListSpecifics, TYPE_FOLDER); | 28 ENUM_CASE(sync_pb::AppListSpecifics, TYPE_FOLDER); |
| 29 ENUM_CASE(sync_pb::AppListSpecifics, TYPE_URL); | 29 ENUM_CASE(sync_pb::AppListSpecifics, TYPE_URL); |
| 30 } | 30 } |
| 31 NOTREACHED(); | 31 NOTREACHED(); |
| 32 return ""; | 32 return ""; |
| 33 } | 33 } |
| 34 | 34 |
| 35 const char* ProtoEnumToString( | 35 const char* ProtoEnumToString( |
| 36 sync_pb::SessionWindow::BrowserType browser_type) { | 36 sync_pb::SessionWindow::BrowserType browser_type) { |
| 37 ASSERT_ENUM_BOUNDS(sync_pb::SessionWindow, BrowserType, TYPE_TABBED, | 37 ASSERT_ENUM_BOUNDS(sync_pb::SessionWindow, BrowserType, TYPE_TABBED, |
| 38 TYPE_POPUP); | 38 TYPE_CUSTOM_TAB); |
| 39 switch (browser_type) { | 39 switch (browser_type) { |
| 40 ENUM_CASE(sync_pb::SessionWindow, TYPE_TABBED); | 40 ENUM_CASE(sync_pb::SessionWindow, TYPE_TABBED); |
| 41 ENUM_CASE(sync_pb::SessionWindow, TYPE_POPUP); | 41 ENUM_CASE(sync_pb::SessionWindow, TYPE_POPUP); |
| 42 ENUM_CASE(sync_pb::SessionWindow, TYPE_CUSTOM_TAB); |
| 42 } | 43 } |
| 43 NOTREACHED(); | 44 NOTREACHED(); |
| 44 return ""; | 45 return ""; |
| 45 } | 46 } |
| 46 | 47 |
| 47 const char* ProtoEnumToString( | 48 const char* ProtoEnumToString( |
| 48 sync_pb::SyncEnums::PageTransition page_transition) { | 49 sync_pb::SyncEnums::PageTransition page_transition) { |
| 49 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, PageTransition, LINK, | 50 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, PageTransition, LINK, |
| 50 KEYWORD_GENERATED); | 51 KEYWORD_GENERATED); |
| 51 switch (page_transition) { | 52 switch (page_transition) { |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 ENUM_CASE(sync_pb::ReadingListSpecifics, READ); | 341 ENUM_CASE(sync_pb::ReadingListSpecifics, READ); |
| 341 } | 342 } |
| 342 NOTREACHED(); | 343 NOTREACHED(); |
| 343 return ""; | 344 return ""; |
| 344 } | 345 } |
| 345 | 346 |
| 346 #undef ASSERT_ENUM_BOUNDS | 347 #undef ASSERT_ENUM_BOUNDS |
| 347 #undef ENUM_CASE | 348 #undef ENUM_CASE |
| 348 | 349 |
| 349 } // namespace syncer | 350 } // namespace syncer |
| OLD | NEW |