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

Side by Side Diff: google_apis/gcm/engine/gcm_checkin_request.h

Issue 98173009: GCM Checkin implementation with unit tests and protobufs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-store
Patch Set: Adding more tests per code review, fixing copyright notice Created 6 years, 11 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
(Empty)
1 // Copyright (c) 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 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 "google_apis/gcm/protocol/android_checkin.pb.h"
13 #include "net/url_request/url_fetcher_delegate.h"
14
15 namespace net {
16 class URLRequestContextGetter;
17 }
18
19 namespace gcm {
20
21 class GCM_EXPORT GCMCheckinRequest : public net::URLFetcherDelegate {
jianli 2014/01/06 22:26:33 Name the class as GCMCheckInRequest to be consiste
fgorski 2014/01/06 23:15:54 Done. By updating the name to CheckinRequest, and
22 public:
23 // A callback function for the checkin request, accepting |android_id| and
24 // |security_token|.
25 typedef base::Callback<void(uint64, uint64)> CheckinRequestCallback;
26
27 GCMCheckinRequest(const CheckinRequestCallback& callback,
28 const checkin_proto::ChromeBuildProto& chrome_build_proto,
29 int64 user_serial_number,
30 const GCMClient::CheckInInfo& checkin_info,
31 net::URLRequestContextGetter* request_context_getter);
32 virtual ~GCMCheckinRequest();
33
34 void Start();
35
36 // URLFetcherDelegate implementation.
37 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
38
39 private:
40 net::URLRequestContextGetter* request_context_getter_;
41 CheckinRequestCallback callback_;
42
43 scoped_ptr<net::URLFetcher> url_fetcher_;
44 checkin_proto::ChromeBuildProto chrome_build_proto_;
45 uint64 android_id_;
46 uint64 security_token_;
47 int64 user_serial_number_;
48
49 DISALLOW_COPY_AND_ASSIGN(GCMCheckinRequest);
50 };
51
52 } // namespace gcm
53
54 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_CHECKIN_REQUEST_H_
OLDNEW
« no previous file with comments | « no previous file | google_apis/gcm/engine/gcm_checkin_request.cc » ('j') | google_apis/gcm/engine/gcm_checkin_request_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698