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

Unified Diff: google_apis/gcm/gcm_client_impl.h

Issue 226893002: Revert of [GCM] Adding periodic checkin controlled by G-services settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/gcm_client_impl.h
diff --git a/google_apis/gcm/gcm_client_impl.h b/google_apis/gcm/gcm_client_impl.h
index daa8310175f4f82b0cff811bb61312f677102d8d..0349270d119738edd14e63989cb478f3b67101f0 100644
--- a/google_apis/gcm/gcm_client_impl.h
+++ b/google_apis/gcm/gcm_client_impl.h
@@ -19,7 +19,7 @@
#include "google_apis/gcm/engine/registration_request.h"
#include "google_apis/gcm/engine/unregistration_request.h"
#include "google_apis/gcm/gcm_client.h"
-#include "google_apis/gcm/protocol/checkin.pb.h"
+#include "google_apis/gcm/protocol/android_checkin.pb.h"
#include "net/base/net_log.h"
#include "net/url_request/url_request_context_getter.h"
@@ -38,10 +38,6 @@
class CheckinRequest;
class ConnectionFactory;
class GCMClientImplTest;
-
-// Map with GServices settings.
-// TODO(fgorski): Extract services handling to a separate struct/class.
-typedef std::map<std::string, std::string> GServicesSettingsMap;
// Helper class for building GCM internals. Allows tests to inject fake versions
// as necessary.
@@ -167,12 +163,13 @@
// Starts a first time device checkin.
void StartCheckin();
- // Completes the device checkin request by parsing the |checkin_response|.
- // Function also cleans up the pending checkin.
- void OnCheckinCompleted(
- const checkin_proto::AndroidCheckinResponse& checkin_response);
- // Schedules next device checkin, based on |last_checkin_time| and
- // checkin_interval specified in GServices settings.
+ // Completes the device checkin request.
+ // |android_id| and |security_token| are expected to be non-zero or an error
+ // is triggered. Function also cleans up the pending checkin.
+ void OnCheckinCompleted(uint64 android_id,
+ uint64 security_token);
+ // Schedules next device checkin, based on |last_checkin_time| and default
+ // checkin interval.
void SchedulePeriodicCheckin(const base::Time& last_checkin_time);
// Callback for setting last checkin time in the |gcm_store_|.
void SetLastCheckinTimeCallback(bool success);
@@ -211,13 +208,6 @@
const mcs_proto::DataMessageStanza& data_message_stanza,
MessageData& message_data);
- // Updates the G-services settings based on the |checkin_response|. It assumes
- // base::Time::Now() is the checkin time.
- void UpdateGServicesSettings(
- const checkin_proto::AndroidCheckinResponse& checkin_response);
- // Completes the G-services settings update request.
- void UpdateGServicesSettingsCallback(bool success);
-
// Builder for the GCM internals (mcs client, etc.).
scoped_ptr<GCMInternalsBuilder> internals_builder_;
@@ -245,12 +235,6 @@
net::BoundNetLog net_log_;
scoped_ptr<ConnectionFactory> connection_factory_;
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
-
- // Map with GServices settings, such us checkin_interval, checkin_url, etc.
- GServicesSettingsMap gservices_settings_;
-
- // Digest of the |gservices_settings|.
- std::string gservices_digest_;
// Controls receiving and sending of packets and reliable message queueing.
scoped_ptr<MCSClient> mcs_client_;
« 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