Chromium Code Reviews| Index: google_apis/gcm/base/mcs_util.h |
| diff --git a/google_apis/gcm/base/mcs_util.h b/google_apis/gcm/base/mcs_util.h |
| index 7f92564ad27fc4d47f1af91a4382a7dfa0816920..40ec68568f51ca6d89bd79296a95c5689fca603c 100644 |
| --- a/google_apis/gcm/base/mcs_util.h |
| +++ b/google_apis/gcm/base/mcs_util.h |
| @@ -15,6 +15,10 @@ |
| #include "google_apis/gcm/base/gcm_export.h" |
| #include "google_apis/gcm/protocol/mcs.pb.h" |
| +namespace base { |
| +class Clock; |
| +} |
| + |
| namespace net { |
| class StreamSocket; |
| } |
| @@ -76,6 +80,13 @@ GCM_EXPORT void SetLastStreamIdReceived( |
| uint32 last_stream_id_received, |
| google::protobuf::MessageLite* protobuf); |
| +// Returns whether the TTL (time to live) for this message has expired, based |
| +// on the |sent| timestamps and base::TimeTicks::Now(). If |protobuf| is not |
| +// for a DataMessageStanza, will return false. |
| +GCM_EXPORT bool HasTTLExpired(const google::protobuf::MessageLite& protobuf, |
|
jianli
2014/01/02 18:52:58
This function returns false when TTL is 0. It will
Nicolas Zea
2014/01/02 21:39:08
Done.
|
| + base::Clock* clock); |
| +GCM_EXPORT int GetTTL(const google::protobuf::MessageLite& protobuf); |
| + |
| } // namespace gcm |
| #endif // GOOGLE_APIS_GCM_BASE_MCS_UTIL_H_ |