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); |