Chromium Code Reviews| Index: google_apis/gcm/engine/gcm_checkin_request.h |
| diff --git a/google_apis/gcm/engine/gcm_checkin_request.h b/google_apis/gcm/engine/gcm_checkin_request.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..aa6f41485303df13d3f0c5f2350151eb59464c31 |
| --- /dev/null |
| +++ b/google_apis/gcm/engine/gcm_checkin_request.h |
| @@ -0,0 +1,50 @@ |
| +// Copyright (c) 2013 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 GOOGLE_APIS_GCM_ENGINE_GCM_CHECKIN_REQUEST_H_ |
| +#define GOOGLE_APIS_GCM_ENGINE_GCM_CHECKIN_REQUEST_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/callback.h" |
| +#include "google_apis/gcm/base/gcm_export.h" |
| +#include "google_apis/gcm/gcm_client.h" |
| +#include "net/url_request/url_fetcher_delegate.h" |
| + |
| +namespace net { |
| +class URLRequestContextGetter; |
| +} |
| + |
| +namespace gcm { |
| + |
| +class GCM_EXPORT GCMCheckinRequest : public net::URLFetcherDelegate { |
| + public: |
| + // TODO(zea): support non-first time checkin. |
|
Nicolas Zea
2014/01/04 01:40:19
is this todo still needed?
fgorski
2014/01/06 20:34:12
Done. Dropped the TODO.
|
| + GCMCheckinRequest(const base::Callback<void(uint64, uint64)>& callback, |
| + net::URLRequestContextGetter* request_context_getter, |
|
Nicolas Zea
2014/01/04 01:40:19
nit: make request context getter last param (input
fgorski
2014/01/06 20:34:12
Done.
|
| + const GCMClient::ChromeCheckInInfo& chrome_checkin_info, |
| + int64 user_serial_number, |
| + const GCMClient::CheckInInfo& checkin_info); |
| + virtual ~GCMCheckinRequest(); |
| + |
| + void Start(); |
| + |
| + // URLFetcherDelegate implementation. |
| + virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
| + |
| + private: |
| + net::URLRequestContextGetter* request_context_getter_; |
| + base::Callback<void(uint64, uint64)> callback_; |
|
jianli
2014/01/04 01:34:10
Please comment on the callback parameters.
fgorski
2014/01/06 20:34:12
Done. That is one of the places where we need an u
|
| + |
| + scoped_ptr<net::URLFetcher> url_fetcher_; |
| + const GCMClient::ChromeCheckInInfo& chrome_checkin_info_; |
| + uint64 android_id_; |
| + uint64 security_token_; |
| + int64 user_serial_number_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(GCMCheckinRequest); |
| +}; |
| + |
| +} // namespace gcm |
| + |
| +#endif // GOOGLE_APIS_GCM_ENGINE_GCM_CHECKIN_REQUEST_H_ |