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

Unified Diff: google_apis/gcm/protocol/android_checkin.proto

Issue 98173009: GCM Checkin implementation with unit tests and protobufs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-store
Patch Set: Renaming fields, class names and files, updating gyp file. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
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..136ef923632ad951482f02d8c0585d1d39600bc5
--- /dev/null
+++ b/google_apis/gcm/protocol/android_checkin.proto
@@ -0,0 +1,113 @@
+// 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 {
+ 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 {
+ // NOTE: the device identifier is in GwsLog.UserInfo.AndroidID, not here.
+ // optional android.AndroidBuildProto build = 1;
Nicolas Zea 2014/01/07 00:41:52 I think we should go ahead and clean up all these
fgorski 2014/01/07 23:46:44 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;
+
+ // Miliseconds since the Unix epoch of the device's last successful checkin.
+ 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];
+
+ // 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;
+
+ // 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 {
+ // 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;
+}

Powered by Google App Engine
This is Rietveld 408576698