Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_ | |
| 6 #define SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 #include "google_apis/gcm/gcm_client.h" | |
| 12 | |
| 13 class GoogleServiceAuthError; | |
| 14 | |
| 15 namespace syncer { | |
| 16 | |
| 17 class GCMNetworkChannelDelegate { | |
| 18 public: | |
| 19 typedef base::Callback<void(const GoogleServiceAuthError& error, | |
| 20 const std::string& token)> RequestTokenCallback; | |
| 21 typedef base::Callback<void(const std::string& registration_id, | |
| 22 gcm::GCMClient::Result result)> RegisterCallback; | |
| 23 | |
| 24 virtual ~GCMNetworkChannelDelegate() {} | |
| 25 | |
| 26 virtual void RequestToken(RequestTokenCallback callback) = 0; | |
|
rlarocque
2014/01/16 18:52:48
Please add a few function comments. A class and/o
pavely
2014/01/17 00:44:39
Done.
| |
| 27 virtual void InvalidateToken(const std::string& token) = 0; | |
| 28 | |
| 29 virtual void Register(RegisterCallback callback) = 0; | |
| 30 }; | |
| 31 } // namespace syncer | |
| 32 | |
| 33 #endif // SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_ | |
| OLD | NEW |