Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // 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
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 // Sync protocol datatype extension for push notifications.. | |
| 6 | |
| 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | |
| 8 // any fields in this file. | |
| 9 | |
| 10 syntax = "proto2"; | |
| 11 | |
| 12 option optimize_for = LITE_RUNTIME; | |
| 13 option retain_unknown_fields = true; | |
| 14 | |
| 15 package sync_pb; | |
| 16 | |
| 17 import "server_render.proto"; | |
| 18 | |
| 19 // This message allows clients to identify a notification they have created. | |
| 20 // IMPORTANT: Everything in this message may be sent to the client in clear text | |
| 21 // - do not expose any user ids, internal product names, credit card numbers, | |
| 22 // etc... anywhere in the message. | |
| 23 message SyncedNotificationIdentifier { | |
| 24 // The application that the notification is a part of. | |
| 25 // | |
| 26 // IMPORTANT: This string may be sent to the client in clear text - do not | |
| 27 // expose any user ids, internal product names, credit card numbers, etc... | |
| 28 optional string app_id = 1; | |
| 29 | |
| 30 // Notifications with the same coalescing key (isolated to the same app_id) | |
| 31 // will be grouped together when fetched. | |
| 32 // | |
| 33 // IMPORTANT: This string may be sent to the client in clear text - do not | |
| 34 // expose any user ids, internal product names, credit card numbers, etc... | |
| 35 optional string coalescing_key = 2; | |
| 36 } | |
| 37 | |
| 38 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.
| |
| 39 // The unique identifier to identify the notification. | |
| 40 optional SyncedNotificationIdentifier id = 1; | |
| 41 | |
| 42 // A secondary type that is isolated within the same app_id. | |
| 43 // | |
| 44 // NOTE: For ASBE support purposes this must be in the format [A-Za-z_]+. | |
| 45 // | |
| 46 // IMPORTANT: This string may be sent to the client in clear text - do not | |
| 47 // expose any user ids, internal product names, credit card numbers, etc... | |
| 48 optional string type = 2; | |
| 49 | |
| 50 // Whatever string the client entered during creation. If no external_id is | |
| 51 // specified, the notification can no longer be identified individually for | |
| 52 // fetching/deleting, etc... | |
| 53 // | |
| 54 // IMPORTANT: This string may be sent to the client in clear text - do not | |
| 55 // expose any user ids, internal product names, credit card numbers, etc... | |
| 56 optional string external_id = 3; | |
| 57 } | |
| 58 | |
| 59 message SyncedNotificationCoalescedNotification { | |
| 60 // The identifier used to identify individual coalesced notifications. | |
| 61 optional SyncedNotificationIdentifier id = 1; | |
| 62 | |
| 63 // All the notifications that are grouped together. | |
| 64 repeated SyncedNotificationNotification notification = 2; | |
| 65 | |
| 66 // Data that is used directly by endpoints to render notifications in the case | |
| 67 // where no "native" app can handle the notification. | |
| 68 optional SyncedNotificationRenderInfo render_info = 3; | |
| 69 | |
| 70 // Read state will be per coalesced notification. | |
| 71 enum ReadState { | |
| 72 UNREAD = 1; | |
| 73 READ = 2; | |
| 74 DISMISSED = 3; | |
| 75 } | |
| 76 optional ReadState read_state = 4; | |
| 77 | |
| 78 // The time when the LATEST notification of the coalesced notification is | |
| 79 // created (in Java time milliseconds). | |
| 80 optional uint64 creation_time_msec = 5; | |
| 81 } | |
| OLD | NEW |