Break TYPE_PC into TYPE_WIN, TYPE_MAC, TYPE_LINUX.

This can give us flexibility down the line with ui changes. No clients use the protocol yet so it's safe to move CrOs from 2 to 4.

BUG=94693
TEST=


Review URL: http://codereview.chromium.org/7811001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98984 0039d316-1c4b-4281-b951-d872f2087c98
parent d775849e
......@@ -91,10 +91,13 @@ const char* GetUpdatesSourceString(
const char* GetDeviceTypeString(
sync_pb::SessionHeader::DeviceType device_type) {
ASSERT_ENUM_BOUNDS(sync_pb::SessionHeader, DeviceType, TYPE_PC, TYPE_CROS);
ASSERT_ENUM_BOUNDS(sync_pb::SessionHeader, DeviceType, TYPE_WIN, TYPE_OTHER);
switch (device_type) {
ENUM_CASE(sync_pb::SessionHeader, TYPE_PC);
ENUM_CASE(sync_pb::SessionHeader, TYPE_WIN);
ENUM_CASE(sync_pb::SessionHeader, TYPE_MAC);
ENUM_CASE(sync_pb::SessionHeader, TYPE_LINUX);
ENUM_CASE(sync_pb::SessionHeader, TYPE_CROS);
ENUM_CASE(sync_pb::SessionHeader, TYPE_OTHER);
}
NOTREACHED();
return "";
......
......@@ -30,8 +30,11 @@ message SessionHeader {
optional string client_name = 3;
// The type of device.
enum DeviceType {
TYPE_PC = 1;
TYPE_CROS = 2;
TYPE_WIN = 1;
TYPE_MAC = 2;
TYPE_LINUX = 3;
TYPE_CROS = 4;
TYPE_OTHER = 5;
}
optional DeviceType device_type = 4;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment