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

Side by Side Diff: components/gcm_driver/gcm_client_impl.h

Issue 681453004: [GCM] Adding last token fetching time handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Android build Created 6 years, 1 month 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
« no previous file with comments | « components/gcm_driver/gcm_client.h ('k') | components/gcm_driver/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 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 COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void Send(const std::string& app_id, 100 void Send(const std::string& app_id,
101 const std::string& receiver_id, 101 const std::string& receiver_id,
102 const OutgoingMessage& message) override; 102 const OutgoingMessage& message) override;
103 void SetRecording(bool recording) override; 103 void SetRecording(bool recording) override;
104 void ClearActivityLogs() override; 104 void ClearActivityLogs() override;
105 GCMStatistics GetStatistics() const override; 105 GCMStatistics GetStatistics() const override;
106 void SetAccountTokens( 106 void SetAccountTokens(
107 const std::vector<AccountTokenInfo>& account_tokens) override; 107 const std::vector<AccountTokenInfo>& account_tokens) override;
108 void UpdateAccountMapping(const AccountMapping& account_mapping) override; 108 void UpdateAccountMapping(const AccountMapping& account_mapping) override;
109 void RemoveAccountMapping(const std::string& account_id) override; 109 void RemoveAccountMapping(const std::string& account_id) override;
110 void SetLastTokenFetchTime(const base::Time& time) override;
110 111
111 // GCMStatsRecorder::Delegate implemenation. 112 // GCMStatsRecorder::Delegate implemenation.
112 void OnActivityRecorded() override; 113 void OnActivityRecorded() override;
113 114
114 // ConnectionFactory::ConnectionListener implementation. 115 // ConnectionFactory::ConnectionListener implementation.
115 void OnConnected(const GURL& current_server, 116 void OnConnected(const GURL& current_server,
116 const net::IPEndPoint& ip_endpoint) override; 117 const net::IPEndPoint& ip_endpoint) override;
117 void OnDisconnected() override; 118 void OnDisconnected() override;
118 119
119 private: 120 private:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Initializes mcs_client_, which handles the connection to MCS. 191 // Initializes mcs_client_, which handles the connection to MCS.
191 void InitializeMCSClient(scoped_ptr<GCMStore::LoadResult> result); 192 void InitializeMCSClient(scoped_ptr<GCMStore::LoadResult> result);
192 // Complets the first time device checkin. 193 // Complets the first time device checkin.
193 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info); 194 void OnFirstTimeDeviceCheckinCompleted(const CheckinInfo& checkin_info);
194 // Starts a login on mcs_client_. 195 // Starts a login on mcs_client_.
195 void StartMCSLogin(); 196 void StartMCSLogin();
196 // Resets state to before initialization. 197 // Resets state to before initialization.
197 void ResetState(); 198 void ResetState();
198 // Sets state to ready. This will initiate the MCS login and notify the 199 // Sets state to ready. This will initiate the MCS login and notify the
199 // delegates. 200 // delegates.
200 void OnReady(const std::vector<AccountMapping>& account_mappings); 201 void OnReady(const std::vector<AccountMapping>& account_mappings,
202 const base::Time& last_token_fetch_time);
201 203
202 // Starts a first time device checkin. 204 // Starts a first time device checkin.
203 void StartCheckin(); 205 void StartCheckin();
204 // Completes the device checkin request by parsing the |checkin_response|. 206 // Completes the device checkin request by parsing the |checkin_response|.
205 // Function also cleans up the pending checkin. 207 // Function also cleans up the pending checkin.
206 void OnCheckinCompleted( 208 void OnCheckinCompleted(
207 const checkin_proto::AndroidCheckinResponse& checkin_response); 209 const checkin_proto::AndroidCheckinResponse& checkin_response);
208 210
209 // Callback passed to GCMStore::SetGServicesSettings. 211 // Callback passed to GCMStore::SetGServicesSettings.
210 void SetGServicesSettingsCallback(bool success); 212 void SetGServicesSettingsCallback(bool success);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 320
319 // Factory for creating references in callbacks. 321 // Factory for creating references in callbacks.
320 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; 322 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_;
321 323
322 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); 324 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl);
323 }; 325 };
324 326
325 } // namespace gcm 327 } // namespace gcm
326 328
327 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ 329 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_client.h ('k') | components/gcm_driver/gcm_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698