summaryrefslogtreecommitdiffstats
path: root/google_apis/gcm/engine/gcm_store.h
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-13 21:42:11 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-13 21:42:11 +0000
commit7c34984a9da54c331a1dba353ed4dbe8f6e25aa5 (patch)
tree4ad31fb00ad616f2202bd3456184f2aa64633ad9 /google_apis/gcm/engine/gcm_store.h
parent9753797060defb83611cd49937f2891086105792 (diff)
downloadchromium_src-7c34984a9da54c331a1dba353ed4dbe8f6e25aa5.zip
chromium_src-7c34984a9da54c331a1dba353ed4dbe8f6e25aa5.tar.gz
chromium_src-7c34984a9da54c331a1dba353ed4dbe8f6e25aa5.tar.bz2
[GCM] Add per-app limits to persistent store
Per app limits are enforced at the time an attempt to add a message to the persistent store is made. By default the limit is 20 messages per app, but future patches may introduce configurable limits. BUG=284553 Review URL: https://codereview.chromium.org/99073010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gcm/engine/gcm_store.h')
-rw-r--r--google_apis/gcm/engine/gcm_store.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/google_apis/gcm/engine/gcm_store.h b/google_apis/gcm/engine/gcm_store.h
index 05fd431..06189a9 100644
--- a/google_apis/gcm/engine/gcm_store.h
+++ b/google_apis/gcm/engine/gcm_store.h
@@ -71,7 +71,10 @@ class GCM_EXPORT GCMStore {
const UpdateCallback& callback) = 0;
// Unacknowledged outgoing messages handling.
- virtual void AddOutgoingMessage(const std::string& persistent_id,
+ // Returns false if app has surpassed message limits, else returns true. Note
+ // that the message isn't persisted until |callback| is invoked with
+ // |success| == true.
+ virtual bool AddOutgoingMessage(const std::string& persistent_id,
const MCSMessage& message,
const UpdateCallback& callback) = 0;
virtual void RemoveOutgoingMessage(const std::string& persistent_id,