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

Side by Side Diff: components/gcm_driver/gcm_driver.h

Issue 1243563002: Teach the GCM Driver how to decrypt incoming messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-push-keys
Patch Set: Created 5 years, 2 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 // Runs the Send callback. 261 // Runs the Send callback.
262 void SendFinished(const std::string& app_id, 262 void SendFinished(const std::string& app_id,
263 const std::string& message_id, 263 const std::string& message_id,
264 GCMClient::Result result); 264 GCMClient::Result result);
265 265
266 bool HasRegisterCallback(const std::string& app_id); 266 bool HasRegisterCallback(const std::string& app_id);
267 267
268 void ClearCallbacks(); 268 void ClearCallbacks();
269 269
270 // Dispatches the OnMessage event to the app handler associated with |app_id|.
271 // If the |message| has been encrypted, it will be asynchronously decrypted
Michael van Ouwerkerk 2015/10/02 14:30:42 nit: This left me wondering whether it will be dis
Peter Beverloo 2015/10/02 15:01:22 Done.
272 // before being dispatched to the handler associated with |app_id|.
273 void DispatchMessage(const std::string& app_id,
274 const IncomingMessage& message);
275
270 private: 276 private:
271 // Common code shared by Unregister and UnregisterWithSenderId. 277 // Common code shared by Unregister and UnregisterWithSenderId.
272 void UnregisterInternal(const std::string& app_id, 278 void UnregisterInternal(const std::string& app_id,
273 const std::string* sender_id, 279 const std::string* sender_id,
274 const UnregisterCallback& callback); 280 const UnregisterCallback& callback);
275 281
276 // Called after unregistration completes in order to trigger the pending 282 // Called after unregistration completes in order to trigger the pending
277 // registration. 283 // registration.
278 void RegisterAfterUnregister( 284 void RegisterAfterUnregister(
279 const std::string& app_id, 285 const std::string& app_id,
(...skipping 22 matching lines...) Expand all
302 DefaultGCMAppHandler default_app_handler_; 308 DefaultGCMAppHandler default_app_handler_;
303 309
304 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_; 310 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_;
305 311
306 DISALLOW_COPY_AND_ASSIGN(GCMDriver); 312 DISALLOW_COPY_AND_ASSIGN(GCMDriver);
307 }; 313 };
308 314
309 } // namespace gcm 315 } // namespace gcm
310 316
311 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 317 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698