Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Side by Side Diff: sync/protocol/proto_enum_conversions.cc

Issue 10985008: sync: Add DeviceInfo protobuf and supporting code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another missing include Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/protocol/proto_enum_conversions.h ('k') | sync/protocol/proto_value_conversions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC); 132 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC);
133 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT); 133 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT);
134 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION); 134 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION);
135 } 135 }
136 NOTREACHED(); 136 NOTREACHED();
137 return ""; 137 return "";
138 138
139 } 139 }
140 140
141 const char* GetDeviceTypeString( 141 const char* GetDeviceTypeString(
142 sync_pb::SessionHeader::DeviceType device_type) { 142 sync_pb::SyncEnums::DeviceType device_type) {
143 ASSERT_ENUM_BOUNDS(sync_pb::SessionHeader, DeviceType, TYPE_WIN, TYPE_TABLET); 143 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET);
144 switch (device_type) { 144 switch (device_type) {
145 ENUM_CASE(sync_pb::SessionHeader, TYPE_WIN); 145 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN);
146 ENUM_CASE(sync_pb::SessionHeader, TYPE_MAC); 146 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC);
147 ENUM_CASE(sync_pb::SessionHeader, TYPE_LINUX); 147 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX);
148 ENUM_CASE(sync_pb::SessionHeader, TYPE_CROS); 148 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS);
149 ENUM_CASE(sync_pb::SessionHeader, TYPE_OTHER); 149 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER);
150 ENUM_CASE(sync_pb::SessionHeader, TYPE_PHONE); 150 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE);
151 ENUM_CASE(sync_pb::SessionHeader, TYPE_TABLET); 151 ENUM_CASE(sync_pb::SyncEnums, TYPE_TABLET);
152 } 152 }
153 NOTREACHED(); 153 NOTREACHED();
154 return ""; 154 return "";
155 } 155 }
156 156
157 const char* GetFaviconTypeString( 157 const char* GetFaviconTypeString(
158 sync_pb::SessionTab::FaviconType favicon_type) { 158 sync_pb::SessionTab::FaviconType favicon_type) {
159 ASSERT_ENUM_BOUNDS(sync_pb::SessionTab, FaviconType, TYPE_WEB_FAVICON, 159 ASSERT_ENUM_BOUNDS(sync_pb::SessionTab, FaviconType, TYPE_WEB_FAVICON,
160 TYPE_WEB_FAVICON); 160 TYPE_WEB_FAVICON);
161 switch (favicon_type) { 161 switch (favicon_type) {
(...skipping 14 matching lines...) Expand all
176 ENUM_CASE(sync_pb::NigoriSpecifics, CUSTOM_PASSPHRASE); 176 ENUM_CASE(sync_pb::NigoriSpecifics, CUSTOM_PASSPHRASE);
177 } 177 }
178 NOTREACHED(); 178 NOTREACHED();
179 return ""; 179 return "";
180 } 180 }
181 181
182 #undef ASSERT_ENUM_BOUNDS 182 #undef ASSERT_ENUM_BOUNDS
183 #undef ENUM_CASE 183 #undef ENUM_CASE
184 184
185 } // namespace syncer 185 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_enum_conversions.h ('k') | sync/protocol/proto_value_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698