OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 #ifndef CONTENT_PUBLIC_COMMON_PUSH_EVENT_PAYLOAD_H_ | |
6 #define CONTENT_PUBLIC_COMMON_PUSH_EVENT_PAYLOAD_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "content/common/content_export.h" | |
11 | |
12 namespace content { | |
13 | |
14 // Structure representing the payload delivered as part of a push message. | |
15 // This struct contains the decrypted information sent from the push | |
16 // service as part of a PushEvent as well as metadata about the information. | |
17 struct CONTENT_EXPORT PushEventPayload { | |
18 PushEventPayload() : is_null(true) {} | |
19 ~PushEventPayload() {} | |
20 | |
21 // Method to both set the data string and update the null status. | |
22 void setData(const std::string& data_in) { | |
23 data = data_in; | |
24 is_null = false; | |
25 } | |
26 | |
27 // Data contained in the payload | |
Avi (use Gerrit)
2016/01/27 02:51:42
full sentences end in a .
harkness
2016/01/27 11:52:18
Done.
| |
28 std::string data; | |
29 // Whether the payload is null or not. Payloads can be valid with non-empty | |
Avi (use Gerrit)
2016/01/27 02:51:42
blank line separating variables.
harkness
2016/01/27 11:52:18
Done.
| |
30 // content, valid with empty content, or null. | |
31 bool is_null; | |
32 }; | |
33 | |
34 } // namespace content | |
35 | |
36 #endif // CONTENT_PUBLIC_COMMON_PUSH_EVENT_PAYLOAD_H_ | |
OLD | NEW |