1 // Copyright 2014 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 // Logging information for Android "checkin" events (automatic, periodic 6 // requests made by Android devices to the server). 7 8 syntax = "proto2"; 9 10 option optimize_for = LITE_RUNTIME; 11 option retain_unknown_fields = true; 12 package checkin_proto; 13 14 // Build characteristics unique to the Chrome browser, and Chrome OS 15 message ChromeBuildProto { 16 enum Platform { 17 PLATFORM_WIN = 1; 18 PLATFORM_MAC = 2; 19 PLATFORM_LINUX = 3; 20 PLATFORM_CROS = 4; 21 PLATFORM_IOS = 5; 22 // Just a placeholder. Likely don't need it due to the presence of the 23 // Android GCM on phone/tablet devices. 24 PLATFORM_ANDROID = 6; 25 } 26 27 enum Channel { 28 CHANNEL_STABLE = 1; 29 CHANNEL_BETA = 2; 30 CHANNEL_DEV = 3; 31 CHANNEL_CANARY = 4; 32 CHANNEL_UNKNOWN = 5; // for tip of tree or custom builds 33 } 34 35 // The platform of the device. 36 optional Platform platform = 1; 37 38 // The Chrome instance's version. 39 optional string chrome_version = 2; 40 41 // The Channel (build type) of Chrome. 42 optional Channel channel = 3; 43 } 44 45 // Information sent by the device in a "checkin" request. 46 message AndroidCheckinProto { 47 // Miliseconds since the Unix epoch of the device's last successful checkin. 48 optional int64 last_checkin_msec = 2; 49 50 // The current MCC+MNC of the mobile device's current cell. 51 optional string cell_operator = 6; 52 53 // The MCC+MNC of the SIM card (different from operator if the 54 // device is roaming, for instance). 55 optional string sim_operator = 7; 56 57 // The device's current roaming state (reported starting in eclair builds). 58 // Currently one of "{,not}mobile-{,not}roaming", if it is present at all. 59 optional string roaming = 8; 60 61 // For devices supporting multiple user profiles (which may be 62 // supported starting in jellybean), the ordinal number of the 63 // profile that is checking in. This is 0 for the primary profile 64 // (which can't be changed without wiping the device), and 1,2,3,... 65 // for additional profiles (which can be added and deleted freely). 66 optional int32 user_number = 9; 67 68 // Class of device. Indicates the type of build proto 69 // (IosBuildProto/ChromeBuildProto/AndroidBuildProto) 70 // That is included in this proto 71 optional DeviceType type = 12 [default = DEVICE_ANDROID_OS]; 72 73 // For devices running MCS on Chrome, build-specific characteristics 74 // of the browser. There are no hardware aspects (except for ChromeOS). 75 // This will only be populated for Chrome builds/ChromeOS devices 76 optional checkin_proto.ChromeBuildProto chrome_build = 13; 77 78 // Note: Some of the Android specific optional fields were skipped to limit 79 // the protobuf definition. 80 // Next 14 81 } 82 83 // enum values correspond to the type of device. 84 // Used in the AndroidCheckinProto and Device proto. 85 enum DeviceType { 86 // Android Device 87 DEVICE_ANDROID_OS = 1; 88 89 // Apple IOS device 90 DEVICE_IOS_OS = 2; 91 92 // Chrome browser - Not Chrome OS. No hardware records. 93 DEVICE_CHROME_BROWSER = 3; 94 95 // Chrome OS 96 DEVICE_CHROME_OS = 4; 97 } 98