OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ |
6 #define GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
bartfab (slow)
2014/06/13 11:27:22
Nit: No longer used.
jianli
2014/06/13 18:04:49
Done.
| |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "google_apis/gcm/base/gcm_export.h" | 15 #include "google_apis/gcm/base/gcm_export.h" |
16 #include "google_apis/gcm/protocol/android_checkin.pb.h" | 16 #include "google_apis/gcm/protocol/android_checkin.pb.h" |
17 #include "google_apis/gcm/protocol/checkin.pb.h" | 17 #include "google_apis/gcm/protocol/checkin.pb.h" |
18 #include "net/base/backoff_entry.h" | 18 #include "net/base/backoff_entry.h" |
19 #include "net/url_request/url_fetcher_delegate.h" | 19 #include "net/url_request/url_fetcher_delegate.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
36 // A callback function for the checkin request, accepting |checkin_response| | 36 // A callback function for the checkin request, accepting |checkin_response| |
37 // protobuf. | 37 // protobuf. |
38 typedef base::Callback<void(const checkin_proto::AndroidCheckinResponse& | 38 typedef base::Callback<void(const checkin_proto::AndroidCheckinResponse& |
39 checkin_response)> CheckinRequestCallback; | 39 checkin_response)> CheckinRequestCallback; |
40 | 40 |
41 // Checkin request details. | 41 // Checkin request details. |
42 struct GCM_EXPORT RequestInfo { | 42 struct GCM_EXPORT RequestInfo { |
43 RequestInfo(uint64 android_id, | 43 RequestInfo(uint64 android_id, |
44 uint64 security_token, | 44 uint64 security_token, |
45 const std::string& settings_digest, | 45 const std::string& settings_digest, |
46 const std::vector<std::string>& account_ids, | |
47 const checkin_proto::ChromeBuildProto& chrome_build_proto); | 46 const checkin_proto::ChromeBuildProto& chrome_build_proto); |
48 ~RequestInfo(); | 47 ~RequestInfo(); |
49 | 48 |
50 // Android ID of the device. | 49 // Android ID of the device. |
51 uint64 android_id; | 50 uint64 android_id; |
52 // Security token of the device. | 51 // Security token of the device. |
53 uint64 security_token; | 52 uint64 security_token; |
54 // Digest of GServices settings on the device. | 53 // Digest of GServices settings on the device. |
55 std::string settings_digest; | 54 std::string settings_digest; |
56 // Account IDs of GAIA accounts related to this device. | |
57 std::vector<std::string> account_ids; | |
58 // Information of the Chrome build of this device. | 55 // Information of the Chrome build of this device. |
59 checkin_proto::ChromeBuildProto chrome_build_proto; | 56 checkin_proto::ChromeBuildProto chrome_build_proto; |
60 }; | 57 }; |
61 | 58 |
62 CheckinRequest(const GURL& checkin_url, | 59 CheckinRequest(const GURL& checkin_url, |
63 const RequestInfo& request_info, | 60 const RequestInfo& request_info, |
64 const net::BackoffEntry::Policy& backoff_policy, | 61 const net::BackoffEntry::Policy& backoff_policy, |
65 const CheckinRequestCallback& callback, | 62 const CheckinRequestCallback& callback, |
66 net::URLRequestContextGetter* request_context_getter, | 63 net::URLRequestContextGetter* request_context_getter, |
67 GCMStatsRecorder* recorder); | 64 GCMStatsRecorder* recorder); |
(...skipping 22 matching lines...) Expand all Loading... | |
90 GCMStatsRecorder* recorder_; | 87 GCMStatsRecorder* recorder_; |
91 | 88 |
92 base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_; | 89 base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_; |
93 | 90 |
94 DISALLOW_COPY_AND_ASSIGN(CheckinRequest); | 91 DISALLOW_COPY_AND_ASSIGN(CheckinRequest); |
95 }; | 92 }; |
96 | 93 |
97 } // namespace gcm | 94 } // namespace gcm |
98 | 95 |
99 #endif // GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ | 96 #endif // GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ |
OLD | NEW |