Chromium Code Reviews| Index: sync/notifier/gcm_network_channel_delegate.h |
| diff --git a/sync/notifier/gcm_network_channel_delegate.h b/sync/notifier/gcm_network_channel_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f6b56a87688d127357eb48b2f30ba0daeaecf5cc |
| --- /dev/null |
| +++ b/sync/notifier/gcm_network_channel_delegate.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_ |
| +#define SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/callback.h" |
| +#include "google_apis/gcm/gcm_client.h" |
| + |
| +class GoogleServiceAuthError; |
| + |
| +namespace syncer { |
| + |
| +class GCMNetworkChannelDelegate { |
| + public: |
| + typedef base::Callback<void(const GoogleServiceAuthError& error, |
| + const std::string& token)> RequestTokenCallback; |
| + typedef base::Callback<void(const std::string& registration_id, |
| + gcm::GCMClient::Result result)> RegisterCallback; |
| + |
| + virtual ~GCMNetworkChannelDelegate() {} |
| + |
| + 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.
|
| + virtual void InvalidateToken(const std::string& token) = 0; |
| + |
| + virtual void Register(RegisterCallback callback) = 0; |
| +}; |
| +} // namespace syncer |
| + |
| +#endif // SYNC_NOTIFIER_GCM_NETWORK_CHANNEL_DELEGATE_H_ |