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

Side by Side Diff: content/public/common/push_event_payload.h

Issue 1636483002: Update the PushEvent to have a nullable PushMessageData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review changes Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698