Chromium Code Reviews| Index: google_apis/gcm/protocol/android_checkin.proto |
| diff --git a/google_apis/gcm/protocol/android_checkin.proto b/google_apis/gcm/protocol/android_checkin.proto |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5af297a09a997482f1ec01d9a570f1fe1eea6991 |
| --- /dev/null |
| +++ b/google_apis/gcm/protocol/android_checkin.proto |
| @@ -0,0 +1,122 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +// |
| +// Logging information for Android "checkin" events (automatic, periodic |
| +// requests made by Android devices to the server). |
| + |
| +syntax = "proto2"; |
| + |
| +option optimize_for = LITE_RUNTIME; |
| +option retain_unknown_fields = true; |
| +package checkin_proto; |
| + |
| +// Build characteristics unique to the Chrome browser, and Chrome OS |
| +message ChromeBuildProto { |
| + // option (datapol.msg_semantic_type) = ST_SOFTWARE_ID; |
|
Nicolas Zea
2014/01/04 01:40:19
remove this?
fgorski
2014/01/06 20:34:12
Done.
|
| + |
| + enum Platform { |
| + PLATFORM_WIN = 1; |
| + PLATFORM_MAC = 2; |
| + PLATFORM_LINUX = 3; |
| + PLATFORM_CROS = 4; |
| + PLATFORM_IOS = 5; |
| + // Just a placeholder. Likely don't need it due to the presence of the |
| + // Android GCM on phone/tablet devices. |
| + PLATFORM_ANDROID = 6; |
| + } |
| + |
| + enum Channel { |
| + CHANNEL_STABLE = 1; |
| + CHANNEL_BETA = 2; |
| + CHANNEL_DEV = 3; |
| + CHANNEL_CANARY = 4; |
| + CHANNEL_UNKNOWN = 5; // for tip of tree or custom builds |
| + } |
| + |
| + // The platform of the device. |
| + optional Platform platform = 1; |
| + |
| + // The Chrome instance's version. |
| + optional string chrome_version = 2; |
| + |
| + // The Channel (build type) of Chrome. |
| + optional Channel channel = 3; |
| +} |
| + |
| +// Information sent by the device in a "checkin" request. |
| +message AndroidCheckinProto { |
| + // option (logs_proto.msg_details) = { |
|
Nicolas Zea
2014/01/04 01:40:19
remove this, and other internal/unused fields or c
fgorski
2014/01/06 20:34:12
Done.
|
| + // may_appear_in: { source_type: "gfstmp/android" |
| + // log_type: "checkin_tmplog" } |
| + // may_appear_in: { source_type: "android" log_type: "checkin_weblog" } |
| + // }; |
| + |
| + // NOTE: the device identifier is in GwsLog.UserInfo.AndroidID, not here. |
| + // optional android.AndroidBuildProto build = 1; |
| + |
| + // For devices running MCS on Chrome, build-specific characteristics |
| + // of the browser. There are no hardware aspects (except for ChromeOS). |
| + // This will only be populated for Chrome builds/ChromeOS devices |
| + optional checkin_proto.ChromeBuildProto chrome_build = 13; |
|
Nicolas Zea
2014/01/04 01:40:19
nit: have fields ordered numerically? so chrome_bu
fgorski
2014/01/06 20:34:12
Done.
|
| + |
| + // For devices running MCS on IOS, build-specific characteristics of |
| + // the MCS library version number and the underlying OS/hardware details. |
| + // This will only be populated for IOS devices |
| + // optional android.IOSBuildProto iosBuild = 11; |
| + |
| + // Time (Java epoch) of the device's last successful checkin. |
|
Nicolas Zea
2014/01/04 01:40:19
s/Java epoch/Millseconds since the Unix epoch
fgorski
2014/01/06 20:34:12
Done.
|
| + optional int64 last_checkin_msec = 2; |
| + |
| + // Requested group membership (may not be honored depending on policy). |
| + // See AndroidExtension.assigned_group for the actual membership we assign. |
| + // repeated string requested_group = 5; |
| + |
| + // Events and statistics are collected since that last successful checkin. |
| + // repeated android.AndroidEventProto event = 3; |
| + // repeated android.AndroidStatisticProto stat = 4; |
| + |
| + // The current MCC+MNC of the mobile device's current cell. |
| + optional string cell_operator = 6; |
| + |
| + // The MCC+MNC of the SIM card (different from operator if the |
| + // device is roaming, for instance). |
| + optional string sim_operator = 7; |
| + |
| + // The device's current roaming state (reported starting in eclair builds). |
| + // Currently one of "{,not}mobile-{,not}roaming", if it is present at all. |
| + optional string roaming = 8; |
| + |
| + // For devices supporting multiple user profiles (which may be |
| + // supported starting in jellybean), the ordinal number of the |
| + // profile that is checking in. This is 0 for the primary profile |
| + // (which can't be changed without wiping the device), and 1,2,3,... |
| + // for additional profiles (which can be added and deleted freely). |
| + optional int32 user_number = 9; |
| + |
| + // Class of device. Indicates the type of build proto |
| + // (IosBuildProto/ChromeBuildProto/AndroidBuildProto) |
| + // That is included in this proto |
| + optional DeviceType type = 12 [default = DEVICE_ANDROID_OS]; |
| + |
| + // Note: 10 was skipped due to a few devices incorrectly using the field |
| + // before it was first used. |
| + // Next 14 |
| +} |
| + |
| +// enum values correspond to the type of device. |
| +// Used in the AndroidCheckinProto and Device proto. |
| +enum DeviceType { |
| + |
|
Nicolas Zea
2014/01/04 01:40:19
nit: remove newline
fgorski
2014/01/06 20:34:12
Done.
|
| + // Android Device |
| + DEVICE_ANDROID_OS = 1; |
| + |
| + // Apple IOS device |
| + DEVICE_IOS_OS = 2; |
| + |
| + // Chrome browser - Not Chrome OS. No hardware records. |
| + DEVICE_CHROME_BROWSER = 3; |
| + |
| + // Chrome OS |
| + DEVICE_CHROME_OS = 4; |
| +} |