OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Sync protocol datatype extension for apps. | 5 // Sync protocol datatype extension for apps. |
6 | 6 |
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change |
8 // any fields in this file. | 8 // any fields in this file. |
9 | 9 |
10 syntax = "proto2"; | 10 syntax = "proto2"; |
11 | 11 |
12 option optimize_for = LITE_RUNTIME; | 12 option optimize_for = LITE_RUNTIME; |
13 option retain_unknown_fields = true; | 13 option retain_unknown_fields = true; |
14 | 14 |
15 package sync_pb; | 15 package sync_pb; |
16 | 16 |
17 import "sync.proto"; | 17 import "sync.proto"; |
18 import "extension_specifics.proto"; | 18 import "extension_specifics.proto"; |
19 | 19 |
20 // Settings related to push notifications for apps. | 20 // Settings related to push notifications for apps. |
21 message AppNotificationSettings { | 21 message AppNotificationSettings { |
| 22 // DEPRECATED: Use oauth_client_id below. |
22 // Whether or not the user has setup notifications at least once. | 23 // Whether or not the user has setup notifications at least once. |
23 // The value for this field will start out false and will be set | 24 // The value for this field will start out false and will be set |
24 // to true when the user accepts receiving notifications for the | 25 // to true when the user accepts receiving notifications for the |
25 // first time and then it will always remain true. | 26 // first time and then it will always remain true. |
26 optional bool initial_setup_done = 1; | 27 optional bool initial_setup_done = 1; |
27 | 28 |
28 // Whether or not the user has disabled notifications. | 29 // Whether or not the user has disabled notifications. |
29 optional bool disabled = 2; | 30 optional bool disabled = 2; |
| 31 |
| 32 // OAuth2 client id to which the user granted the notification permission. |
| 33 // This field will start out empty. |
| 34 // It will be set when the user accepts receiving notifications. |
| 35 // This field is used when the user revokes the notifications permission. |
| 36 // Note that it is never cleared after it was set once. Hence, the presence |
| 37 // of this field can be used to determine if the user has setup notifications |
| 38 // at least once for the given app. |
| 39 optional string oauth_client_id = 3; |
30 } | 40 } |
31 | 41 |
32 // Properties of app sync objects. | 42 // Properties of app sync objects. |
33 // | 43 // |
34 // For now, an app is just an extension. We keep the two data types | 44 // For now, an app is just an extension. We keep the two data types |
35 // separate for future-proofing purposes. | 45 // separate for future-proofing purposes. |
36 message AppSpecifics { | 46 message AppSpecifics { |
37 // Extension data. | 47 // Extension data. |
38 optional ExtensionSpecifics extension = 1; | 48 optional ExtensionSpecifics extension = 1; |
39 | 49 |
40 // Notification settings. | 50 // Notification settings. |
41 optional AppNotificationSettings notification_settings = 2; | 51 optional AppNotificationSettings notification_settings = 2; |
42 } | 52 } |
43 | 53 |
44 extend EntitySpecifics { | 54 extend EntitySpecifics { |
45 optional AppSpecifics app = 48364; | 55 optional AppSpecifics app = 48364; |
46 } | 56 } |
OLD | NEW |