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

Unified Diff: components/gcm_driver/gcm_driver.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/gcm_driver.h ('k') | components/gcm_driver/gcm_driver_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver.cc
diff --git a/components/gcm_driver/gcm_driver.cc b/components/gcm_driver/gcm_driver.cc
index 1b115c030b5467802581d8b3a19c6346269e226e..10adbaeb4c3213daff653c9d7fe2208416138b84 100644
--- a/components/gcm_driver/gcm_driver.cc
+++ b/components/gcm_driver/gcm_driver.cc
@@ -12,10 +12,14 @@
namespace gcm {
-InstanceIDStore::InstanceIDStore() {
+namespace {
+const size_t kMaxSenders = 100;
+} // namespace
+
+InstanceIDHandler::InstanceIDHandler() {
}
-InstanceIDStore::~InstanceIDStore() {
+InstanceIDHandler::~InstanceIDHandler() {
}
GCMDriver::GCMDriver() : weak_ptr_factory_(this) {
@@ -28,7 +32,7 @@ void GCMDriver::Register(const std::string& app_id,
const std::vector<std::string>& sender_ids,
const RegisterCallback& callback) {
DCHECK(!app_id.empty());
- DCHECK(!sender_ids.empty());
+ DCHECK(!sender_ids.empty() && sender_ids.size() <= kMaxSenders);
DCHECK(!callback.is_null());
GCMClient::Result result = EnsureStarted(GCMClient::IMMEDIATE_START);
« no previous file with comments | « components/gcm_driver/gcm_driver.h ('k') | components/gcm_driver/gcm_driver_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698