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

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

Issue 1126233004: Persist Instance ID data to GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac Created 5 years, 7 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
« 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const OutgoingMessage& message) override; 119 const OutgoingMessage& message) override;
120 void SetRecording(bool recording) override; 120 void SetRecording(bool recording) override;
121 void ClearActivityLogs() override; 121 void ClearActivityLogs() override;
122 GCMStatistics GetStatistics() const override; 122 GCMStatistics GetStatistics() const override;
123 void SetAccountTokens( 123 void SetAccountTokens(
124 const std::vector<AccountTokenInfo>& account_tokens) override; 124 const std::vector<AccountTokenInfo>& account_tokens) override;
125 void UpdateAccountMapping(const AccountMapping& account_mapping) override; 125 void UpdateAccountMapping(const AccountMapping& account_mapping) override;
126 void RemoveAccountMapping(const std::string& account_id) override; 126 void RemoveAccountMapping(const std::string& account_id) override;
127 void SetLastTokenFetchTime(const base::Time& time) override; 127 void SetLastTokenFetchTime(const base::Time& time) override;
128 void UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer) override; 128 void UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer) override;
129 void AddInstanceIDData(const std::string& app_id,
130 const std::string& instance_id_data) override;
131 void RemoveInstanceIDData(const std::string& app_id) override;
132 std::string GetInstanceIDData(const std::string& app_id) override;
129 133
130 // GCMStatsRecorder::Delegate implemenation. 134 // GCMStatsRecorder::Delegate implemenation.
131 void OnActivityRecorded() override; 135 void OnActivityRecorded() override;
132 136
133 // ConnectionFactory::ConnectionListener implementation. 137 // ConnectionFactory::ConnectionListener implementation.
134 void OnConnected(const GURL& current_server, 138 void OnConnected(const GURL& current_server,
135 const net::IPEndPoint& ip_endpoint) override; 139 const net::IPEndPoint& ip_endpoint) override;
136 void OnDisconnected() override; 140 void OnDisconnected() override;
137 141
138 private: 142 private:
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 PendingUnregistrationRequests pending_unregistration_requests_; 338 PendingUnregistrationRequests pending_unregistration_requests_;
335 STLValueDeleter<PendingUnregistrationRequests> 339 STLValueDeleter<PendingUnregistrationRequests>
336 pending_unregistration_requests_deleter_; 340 pending_unregistration_requests_deleter_;
337 341
338 // G-services settings that were provided by MCS. 342 // G-services settings that were provided by MCS.
339 GServicesSettings gservices_settings_; 343 GServicesSettings gservices_settings_;
340 344
341 // Time of the last successful checkin. 345 // Time of the last successful checkin.
342 base::Time last_checkin_time_; 346 base::Time last_checkin_time_;
343 347
348 // Cached instance ID data, key is app id.
349 std::map<std::string, std::string> instance_id_data_;
350
344 // Factory for creating references when scheduling periodic checkin. 351 // Factory for creating references when scheduling periodic checkin.
345 base::WeakPtrFactory<GCMClientImpl> periodic_checkin_ptr_factory_; 352 base::WeakPtrFactory<GCMClientImpl> periodic_checkin_ptr_factory_;
346 353
347 // Factory for creating references in callbacks. 354 // Factory for creating references in callbacks.
348 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; 355 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_;
349 356
350 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); 357 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl);
351 }; 358 };
352 359
353 } // namespace gcm 360 } // namespace gcm
354 361
355 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ 362 #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