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

Unified Diff: sync/protocol/server_data.proto

Issue 11745024: Synced Notification Sync Change Processor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: SyncedNotifications - first round of CR comment fixes. Created 7 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: sync/protocol/server_data.proto
diff --git a/sync/protocol/server_data.proto b/sync/protocol/server_data.proto
new file mode 100644
index 0000000000000000000000000000000000000000..005b948073e9fa844889282d9ec33b185edd7519
--- /dev/null
+++ b/sync/protocol/server_data.proto
@@ -0,0 +1,81 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
dcheng 2013/01/18 21:56:13 Meta comment that the file could use a better name
Pete Williamson 2013/01/23 01:45:55 The file is named to match its server side counter
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Sync protocol datatype extension for push notifications..
+
+// Update proto_value_conversions{.h,.cc,_unittest.cc} if you change
+// any fields in this file.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+option retain_unknown_fields = true;
+
+package sync_pb;
+
+import "server_render.proto";
+
+// This message allows clients to identify a notification they have created.
+// IMPORTANT: Everything in this message may be sent to the client in clear text
+// - do not expose any user ids, internal product names, credit card numbers,
+// etc... anywhere in the message.
+message SyncedNotificationIdentifier {
+ // The application that the notification is a part of.
+ //
+ // IMPORTANT: This string may be sent to the client in clear text - do not
+ // expose any user ids, internal product names, credit card numbers, etc...
+ optional string app_id = 1;
+
+ // Notifications with the same coalescing key (isolated to the same app_id)
+ // will be grouped together when fetched.
+ //
+ // IMPORTANT: This string may be sent to the client in clear text - do not
+ // expose any user ids, internal product names, credit card numbers, etc...
+ optional string coalescing_key = 2;
+}
+
+message SyncedNotificationNotification {
Nicolas Zea 2013/01/18 23:09:25 nit: perhaps just SyncedNotification and Coalesced
Pete Williamson 2013/01/23 01:45:55 We already have a SyncedNotification class (it is
Nicolas Zea 2013/01/25 00:18:45 They're within different namespaces, so the names
Pete Williamson 2013/01/25 19:58:36 Done.
+ // The unique identifier to identify the notification.
+ optional SyncedNotificationIdentifier id = 1;
+
+ // A secondary type that is isolated within the same app_id.
+ //
+ // NOTE: For ASBE support purposes this must be in the format [A-Za-z_]+.
+ //
+ // IMPORTANT: This string may be sent to the client in clear text - do not
+ // expose any user ids, internal product names, credit card numbers, etc...
+ optional string type = 2;
+
+ // Whatever string the client entered during creation. If no external_id is
+ // specified, the notification can no longer be identified individually for
+ // fetching/deleting, etc...
+ //
+ // IMPORTANT: This string may be sent to the client in clear text - do not
+ // expose any user ids, internal product names, credit card numbers, etc...
+ optional string external_id = 3;
+}
+
+message SyncedNotificationCoalescedNotification {
+ // The identifier used to identify individual coalesced notifications.
+ optional SyncedNotificationIdentifier id = 1;
+
+ // All the notifications that are grouped together.
+ repeated SyncedNotificationNotification notification = 2;
+
+ // Data that is used directly by endpoints to render notifications in the case
+ // where no "native" app can handle the notification.
+ optional SyncedNotificationRenderInfo render_info = 3;
+
+ // Read state will be per coalesced notification.
+ enum ReadState {
+ UNREAD = 1;
+ READ = 2;
+ DISMISSED = 3;
+ }
+ optional ReadState read_state = 4;
+
+ // The time when the LATEST notification of the coalesced notification is
+ // created (in Java time milliseconds).
+ optional uint64 creation_time_msec = 5;
+}

Powered by Google App Engine
This is Rietveld 408576698