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

Side by Side Diff: google_apis/gcm/gcm_client.h

Issue 185133008: [GCM] Only allow the senders that the application is currently registered for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving the comment up Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_H_ 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_H_
6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 MessageData data; 70 MessageData data;
71 }; 71 };
72 72
73 // Message being received from the other party. 73 // Message being received from the other party.
74 struct GCM_EXPORT IncomingMessage { 74 struct GCM_EXPORT IncomingMessage {
75 IncomingMessage(); 75 IncomingMessage();
76 ~IncomingMessage(); 76 ~IncomingMessage();
77 77
78 MessageData data; 78 MessageData data;
79 std::string collapse_key; 79 std::string collapse_key;
80 std::string sender_id;
80 }; 81 };
81 82
82 // A delegate interface that allows the GCMClient instance to interact with 83 // A delegate interface that allows the GCMClient instance to interact with
83 // its caller, i.e. notifying asynchronous event. 84 // its caller, i.e. notifying asynchronous event.
84 class Delegate { 85 class Delegate {
85 public: 86 public:
86 // Called when the registration completed successfully or an error occurs. 87 // Called when the registration completed successfully or an error occurs.
87 // |app_id|: application ID. 88 // |app_id|: application ID.
88 // |registration_id|: non-empty if the registration completed successfully. 89 // |registration_id|: non-empty if the registration completed successfully.
89 // |result|: the type of the error if an error occured, success otherwise. 90 // |result|: the type of the error if an error occured, success otherwise.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // |receiver_id|: registration ID of the receiver party. 183 // |receiver_id|: registration ID of the receiver party.
183 // |message|: message to be sent. 184 // |message|: message to be sent.
184 virtual void Send(const std::string& app_id, 185 virtual void Send(const std::string& app_id,
185 const std::string& receiver_id, 186 const std::string& receiver_id,
186 const OutgoingMessage& message) = 0; 187 const OutgoingMessage& message) = 0;
187 }; 188 };
188 189
189 } // namespace gcm 190 } // namespace gcm
190 191
191 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ 192 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/services/gcm/gcm_profile_service_unittest.cc ('k') | google_apis/gcm/gcm_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698