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

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: Address comments Created 4 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 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 <stddef.h>
Peter Beverloo 2016/01/26 12:35:18 What do we use stddef.h for? We should include <s
harkness 2016/01/26 14:49:20 Done.
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) {
23 data_ = data;
24 is_null_ = false;
25 }
26
27 // Data contained in the payload
28 std::string data_;
Peter Beverloo 2016/01/26 12:35:18 Sorry! Since this is a struct, we should not have
harkness 2016/01/26 14:49:20 Done.
29 // Whether the payload is null or not. Payloads can be valid with non-empty
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