| 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 #ifndef SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ | 5 #ifndef SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ |
| 6 #define SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ | 6 #define SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // Keep this file in sync with the .proto files in this directory. | 9 // Keep this file in sync with the .proto files in this directory. |
| 10 | 10 |
| 11 #include "sync/protocol/session_specifics.pb.h" | 11 #include "sync/protocol/session_specifics.pb.h" |
| 12 #include "sync/protocol/sync.pb.h" | 12 #include "sync/protocol/sync.pb.h" |
| 13 | 13 |
| 14 // Utility functions to get the string equivalent for some sync proto | 14 // Utility functions to get the string equivalent for some sync proto |
| 15 // enums. | 15 // enums. |
| 16 | 16 |
| 17 namespace csync { | 17 namespace syncer { |
| 18 | 18 |
| 19 // The returned strings (which don't have to be freed) are in ASCII. | 19 // The returned strings (which don't have to be freed) are in ASCII. |
| 20 // The result of passing in an invalid enum value is undefined. | 20 // The result of passing in an invalid enum value is undefined. |
| 21 | 21 |
| 22 const char* GetBrowserTypeString( | 22 const char* GetBrowserTypeString( |
| 23 sync_pb::SessionWindow::BrowserType browser_type); | 23 sync_pb::SessionWindow::BrowserType browser_type); |
| 24 | 24 |
| 25 const char* GetPageTransitionString( | 25 const char* GetPageTransitionString( |
| 26 sync_pb::SyncEnums::PageTransition page_transition); | 26 sync_pb::SyncEnums::PageTransition page_transition); |
| 27 | 27 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 const char* GetErrorTypeString(sync_pb::SyncEnums::ErrorType error_type); | 38 const char* GetErrorTypeString(sync_pb::SyncEnums::ErrorType error_type); |
| 39 | 39 |
| 40 const char* GetActionString(sync_pb::SyncEnums::Action action); | 40 const char* GetActionString(sync_pb::SyncEnums::Action action); |
| 41 | 41 |
| 42 const char* GetDeviceTypeString( | 42 const char* GetDeviceTypeString( |
| 43 sync_pb::SessionHeader::DeviceType device_type); | 43 sync_pb::SessionHeader::DeviceType device_type); |
| 44 | 44 |
| 45 const char* GetFaviconTypeString( | 45 const char* GetFaviconTypeString( |
| 46 sync_pb::SessionTab::FaviconType favicon_type); | 46 sync_pb::SessionTab::FaviconType favicon_type); |
| 47 | 47 |
| 48 } // namespace csync | 48 } // namespace syncer |
| 49 | 49 |
| 50 #endif // SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ | 50 #endif // SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ |
| OLD | NEW |