Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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 GOOGLE_APIS_GCM_ENGINE_GCM_CHECKIN_REQUEST_H_ | |
| 6 #define GOOGLE_APIS_GCM_ENGINE_GCM_CHECKIN_REQUEST_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/callback.h" | |
| 10 #include "google_apis/gcm/base/gcm_export.h" | |
| 11 #include "google_apis/gcm/gcm_client.h" | |
| 12 #include "net/url_request/url_fetcher_delegate.h" | |
| 13 | |
| 14 namespace net { | |
| 15 class URLRequestContextGetter; | |
| 16 } | |
| 17 | |
| 18 namespace gcm { | |
| 19 | |
| 20 class GCM_EXPORT GCMCheckinRequest : public net::URLFetcherDelegate { | |
| 21 public: | |
| 22 // 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.
| |
| 23 GCMCheckinRequest(const base::Callback<void(uint64, uint64)>& callback, | |
| 24 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.
| |
| 25 const GCMClient::ChromeCheckInInfo& chrome_checkin_info, | |
| 26 int64 user_serial_number, | |
| 27 const GCMClient::CheckInInfo& checkin_info); | |
| 28 virtual ~GCMCheckinRequest(); | |
| 29 | |
| 30 void Start(); | |
| 31 | |
| 32 // URLFetcherDelegate implementation. | |
| 33 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | |
| 34 | |
| 35 private: | |
| 36 net::URLRequestContextGetter* request_context_getter_; | |
| 37 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
| |
| 38 | |
| 39 scoped_ptr<net::URLFetcher> url_fetcher_; | |
| 40 const GCMClient::ChromeCheckInInfo& chrome_checkin_info_; | |
| 41 uint64 android_id_; | |
| 42 uint64 security_token_; | |
| 43 int64 user_serial_number_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(GCMCheckinRequest); | |
| 46 }; | |
| 47 | |
| 48 } // namespace gcm | |
| 49 | |
| 50 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_CHECKIN_REQUEST_H_ | |
| OLD | NEW |