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

Side by Side Diff: google_apis/gcm/gcm_client_impl.h

Issue 222913004: [GCM] Minimum change for periodic checkin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applying a final comments. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « google_apis/gcm/engine/gcm_store_impl_unittest.cc ('k') | google_apis/gcm/gcm_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_GCM_CLIENT_IMPL_H_ 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_
6 #define GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info); 155 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info);
156 // Starts a login on mcs_client_. 156 // Starts a login on mcs_client_.
157 void StartMCSLogin(); 157 void StartMCSLogin();
158 // Resets state to before initialization. 158 // Resets state to before initialization.
159 void ResetState(); 159 void ResetState();
160 // Sets state to ready. This will initiate the MCS login and notify the 160 // Sets state to ready. This will initiate the MCS login and notify the
161 // delegates. 161 // delegates.
162 void OnReady(); 162 void OnReady();
163 163
164 // Starts a first time device checkin. 164 // Starts a first time device checkin.
165 void StartCheckin(const CheckinInfo& checkin_info); 165 void StartCheckin();
166 // Completes the device checkin request. 166 // Completes the device checkin request.
167 // |android_id| and |security_token| are expected to be non-zero or an error 167 // |android_id| and |security_token| are expected to be non-zero or an error
168 // is triggered. Function also cleans up the pending checkin. 168 // is triggered. Function also cleans up the pending checkin.
169 void OnCheckinCompleted(uint64 android_id, 169 void OnCheckinCompleted(uint64 android_id,
170 uint64 security_token); 170 uint64 security_token);
171 // Schedules next device checkin, based on |last_checkin_time| and default
172 // checkin interval.
173 void SchedulePeriodicCheckin(const base::Time& last_checkin_time);
174 // Callback for setting last checkin time in the |gcm_store_|.
175 void SetLastCheckinTimeCallback(bool success);
171 176
172 // Callback for persisting device credentials in the |gcm_store_|. 177 // Callback for persisting device credentials in the |gcm_store_|.
173 void SetDeviceCredentialsCallback(bool success); 178 void SetDeviceCredentialsCallback(bool success);
174 179
175 // Callback for persisting registration info in the |gcm_store_|. 180 // Callback for persisting registration info in the |gcm_store_|.
176 void UpdateRegistrationCallback(bool success); 181 void UpdateRegistrationCallback(bool success);
177 182
178 // Completes the registration request. 183 // Completes the registration request.
179 void OnRegisterCompleted(const std::string& app_id, 184 void OnRegisterCompleted(const std::string& app_id,
180 const std::vector<std::string>& sender_ids, 185 const std::vector<std::string>& sender_ids,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 259
255 // Factory for creating references in callbacks. 260 // Factory for creating references in callbacks.
256 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; 261 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_;
257 262
258 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); 263 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl);
259 }; 264 };
260 265
261 } // namespace gcm 266 } // namespace gcm
262 267
263 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ 268 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/gcm_store_impl_unittest.cc ('k') | google_apis/gcm/gcm_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698