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

Side by Side Diff: google_apis/gcm/monitoring/gcm_stats_recorder.h

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch to land 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 | « google_apis/gcm/monitoring/fake_gcm_stats_recorder.cc ('k') | no next file » | 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 GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ 5 #ifndef GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_
6 #define GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ 6 #define GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 enum ReceivedMessageType { 25 enum ReceivedMessageType {
26 // Data message. 26 // Data message.
27 DATA_MESSAGE, 27 DATA_MESSAGE,
28 // Message that indicates some messages have been deleted on the server. 28 // Message that indicates some messages have been deleted on the server.
29 DELETED_MESSAGES, 29 DELETED_MESSAGES,
30 }; 30 };
31 31
32 // A delegate interface that allows the GCMStatsRecorderImpl instance to 32 // A delegate interface that allows the GCMStatsRecorderImpl instance to
33 // interact with its container. 33 // interact with its container.
34 class Delegate { 34 class Delegate {
35 public: 35 public:
36 // Called when the GCMStatsRecorderImpl is recording activities and a new 36 // Called when the GCMStatsRecorderImpl is recording activities and a new
37 // activity has just been recorded. 37 // activity has just been recorded.
38 virtual void OnActivityRecorded() = 0; 38 virtual void OnActivityRecorded() = 0;
39 }; 39 };
40 40
41 GCMStatsRecorder() {} 41 GCMStatsRecorder() {}
42 virtual ~GCMStatsRecorder() {} 42 virtual ~GCMStatsRecorder() {}
43 43
44 // Records that a check-in has been initiated. 44 // Records that a check-in has been initiated.
45 virtual void RecordCheckinInitiated(uint64 android_id) = 0; 45 virtual void RecordCheckinInitiated(uint64 android_id) = 0;
(...skipping 20 matching lines...) Expand all
66 // Records that connection has failed with a network error code. 66 // Records that connection has failed with a network error code.
67 virtual void RecordConnectionFailure(int network_error) = 0; 67 virtual void RecordConnectionFailure(int network_error) = 0;
68 68
69 // Records that connection reset has been signaled. 69 // Records that connection reset has been signaled.
70 virtual void RecordConnectionResetSignaled( 70 virtual void RecordConnectionResetSignaled(
71 ConnectionFactory::ConnectionResetReason reason) = 0; 71 ConnectionFactory::ConnectionResetReason reason) = 0;
72 72
73 // Records that a registration request has been sent. This could be initiated 73 // Records that a registration request has been sent. This could be initiated
74 // directly from API, or from retry logic. 74 // directly from API, or from retry logic.
75 virtual void RecordRegistrationSent(const std::string& app_id, 75 virtual void RecordRegistrationSent(const std::string& app_id,
76 const std::string& sender_ids) = 0; 76 const std::string& senders) = 0;
77 77
78 // Records that a registration response has been received from server. 78 // Records that a registration response has been received from server.
79 virtual void RecordRegistrationResponse( 79 virtual void RecordRegistrationResponse(
80 const std::string& app_id, 80 const std::string& app_id,
81 const std::vector<std::string>& sender_ids, 81 const std::string& senders,
82 RegistrationRequest::Status status) = 0; 82 RegistrationRequest::Status status) = 0;
83 83
84 // Records that a registration retry has been requested. The actual retry 84 // Records that a registration retry has been requested. The actual retry
85 // action may not occur until some time later according to backoff logic. 85 // action may not occur until some time later according to backoff logic.
86 virtual void RecordRegistrationRetryRequested( 86 virtual void RecordRegistrationRetryRequested(
87 const std::string& app_id, 87 const std::string& app_id,
88 const std::vector<std::string>& sender_ids, 88 const std::string& senders,
89 int retries_left) = 0; 89 int retries_left) = 0;
90 90
91 // Records that an unregistration request has been sent. This could be 91 // Records that an unregistration request has been sent. This could be
92 // initiated directly from API, or from retry logic. 92 // initiated directly from API, or from retry logic.
93 virtual void RecordUnregistrationSent(const std::string& app_id) = 0; 93 virtual void RecordUnregistrationSent(const std::string& app_id) = 0;
94 94
95 // Records that an unregistration response has been received from server. 95 // Records that an unregistration response has been received from server.
96 virtual void RecordUnregistrationResponse( 96 virtual void RecordUnregistrationResponse(
97 const std::string& app_id, 97 const std::string& app_id,
98 UnregistrationRequest::Status status) = 0; 98 UnregistrationRequest::Status status) = 0;
(...skipping 27 matching lines...) Expand all
126 int ttl) = 0; 126 int ttl) = 0;
127 // Records that a 'send error' message was received. 127 // Records that a 'send error' message was received.
128 virtual void RecordIncomingSendError(const std::string& app_id, 128 virtual void RecordIncomingSendError(const std::string& app_id,
129 const std::string& receiver_id, 129 const std::string& receiver_id,
130 const std::string& message_id) = 0; 130 const std::string& message_id) = 0;
131 }; 131 };
132 132
133 } // namespace gcm 133 } // namespace gcm
134 134
135 #endif // GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ 135 #endif // GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/monitoring/fake_gcm_stats_recorder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698