| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/gcm_driver/gcm_driver.h" | 5 #include "components/gcm_driver/gcm_driver.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
| 15 #include "components/gcm_driver/gcm_app_handler.h" | 15 #include "components/gcm_driver/gcm_app_handler.h" |
| 16 | 16 |
| 17 namespace gcm { | 17 namespace gcm { |
| 18 | 18 |
| 19 namespace { | |
| 20 | |
| 21 const size_t kMaxSenders = 100; | |
| 22 | |
| 23 } // namespace | |
| 24 | |
| 25 InstanceIDHandler::InstanceIDHandler() { | 19 InstanceIDHandler::InstanceIDHandler() { |
| 26 } | 20 } |
| 27 | 21 |
| 28 InstanceIDHandler::~InstanceIDHandler() { | 22 InstanceIDHandler::~InstanceIDHandler() { |
| 29 } | 23 } |
| 30 | 24 |
| 31 void InstanceIDHandler::DeleteAllTokensForApp( | 25 void InstanceIDHandler::DeleteAllTokensForApp( |
| 32 const std::string& app_id, const DeleteTokenCallback& callback) { | 26 const std::string& app_id, const DeleteTokenCallback& callback) { |
| 33 DeleteToken(app_id, "*", "*", callback); | 27 DeleteToken(app_id, "*", "*", callback); |
| 34 } | 28 } |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 GCMClient::Result result) { | 316 GCMClient::Result result) { |
| 323 // Invoke the original unregister callback. | 317 // Invoke the original unregister callback. |
| 324 unregister_callback.Run(result); | 318 unregister_callback.Run(result); |
| 325 | 319 |
| 326 // Trigger the pending registration. | 320 // Trigger the pending registration. |
| 327 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end()); | 321 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end()); |
| 328 RegisterImpl(app_id, normalized_sender_ids); | 322 RegisterImpl(app_id, normalized_sender_ids); |
| 329 } | 323 } |
| 330 | 324 |
| 331 } // namespace gcm | 325 } // namespace gcm |
| OLD | NEW |