Add a constructor that takes only the "interesting" args (basically the args that...
[chromium-blink-merge.git] / sync / protocol / proto_enum_conversions.h
blobd2b4189e4f74cfd652f730eef5f901167186f0a3
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
3 // found in the LICENSE file.
5 #ifndef SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
6 #define SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
8 // Keep this file in sync with the .proto files in this directory.
10 #include "sync/protocol/session_specifics.pb.h"
11 #include "sync/protocol/sync.pb.h"
13 // Utility functions to get the string equivalent for some sync proto
14 // enums.
16 namespace syncer {
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.
21 const char* GetBrowserTypeString(
22 sync_pb::SessionWindow::BrowserType browser_type);
24 const char* GetPageTransitionString(
25 sync_pb::SyncEnums::PageTransition page_transition);
27 const char* GetPageTransitionQualifierString(
28 sync_pb::SyncEnums::PageTransitionQualifier
29 page_transition_qualifier);
31 const char* GetUpdatesSourceString(
32 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source);
34 const char* GetResponseTypeString(
35 sync_pb::CommitResponse::ResponseType response_type);
37 const char* GetErrorTypeString(sync_pb::SyncEnums::ErrorType error_type);
39 const char* GetActionString(sync_pb::SyncEnums::Action action);
41 const char* GetDeviceTypeString(
42 sync_pb::SessionHeader::DeviceType device_type);
44 const char* GetFaviconTypeString(
45 sync_pb::SessionTab::FaviconType favicon_type);
47 } // namespace syncer
49 #endif // SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_