| Index: components/gcm_driver/gcm_driver.cc
|
| diff --git a/components/gcm_driver/gcm_driver.cc b/components/gcm_driver/gcm_driver.cc
|
| index a82e7b1bcff9e284809f57530eef878fea907d35..f9187b54027e1a6adb93f587d751d49869a4833a 100644
|
| --- a/components/gcm_driver/gcm_driver.cc
|
| +++ b/components/gcm_driver/gcm_driver.cc
|
| @@ -69,8 +69,12 @@ void GCMDriver::Register(const std::string& app_id,
|
| }
|
|
|
| void GCMDriver::Unregister(const std::string& app_id,
|
| + const std::vector<std::string>& sender_ids,
|
| const UnregisterCallback& callback) {
|
| DCHECK(!app_id.empty());
|
| +#if defined(OS_ANDROID)
|
| + DCHECK(!sender_ids.empty());
|
| +#endif
|
| DCHECK(!callback.is_null());
|
|
|
| GCMClient::Result result = EnsureStarted(GCMClient::IMMEDIATE_START);
|
| @@ -86,9 +90,13 @@ void GCMDriver::Unregister(const std::string& app_id,
|
| return;
|
| }
|
|
|
| + // Normalize the sender IDs by making them sorted.
|
| + std::vector<std::string> normalized_sender_ids = sender_ids;
|
| + std::sort(normalized_sender_ids.begin(), normalized_sender_ids.end());
|
| +
|
| unregister_callbacks_[app_id] = callback;
|
|
|
| - UnregisterImpl(app_id);
|
| + UnregisterImpl(app_id, normalized_sender_ids);
|
| }
|
|
|
| void GCMDriver::Send(const std::string& app_id,
|
|
|