1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ 6 #define CHROME_BROWSER_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ 7 #pragma once 8 9 // Keep this file in sync with the .proto files in this directory. 10 11 #include "chrome/browser/sync/protocol/session_specifics.pb.h" 12 13 // Utility functions to get the string equivalent for some sync proto 14 // enums. 15 16 namespace browser_sync { 17 18 // The returned strings (which don't have to be freed) are in ASCII. 19 // The result of passing in an invalid enum value is undefined. 20 21 const char* GetBrowserTypeString( 22 sync_pb::SessionWindow::BrowserType browser_type); 23 24 const char* GetPageTransitionString( 25 sync_pb::TabNavigation::PageTransition page_transition); 26 27 const char* GetPageTransitionQualifierString( 28 sync_pb::TabNavigation::PageTransitionQualifier 29 page_transition_qualifier); 30 31 const char* GetUpdatesSourceString( 32 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source); 33 34 } // namespace browser_sync 35 36 #endif // CHROME_BROWSER_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ 37