| 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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 } // namespace | 23 } // namespace |
| 24 | 24 |
| 25 InstanceIDHandler::InstanceIDHandler() { | 25 InstanceIDHandler::InstanceIDHandler() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 InstanceIDHandler::~InstanceIDHandler() { | 28 InstanceIDHandler::~InstanceIDHandler() { |
| 29 } | 29 } |
| 30 | 30 |
| 31 void InstanceIDHandler::DeleteAllTokensForApp( | 31 void InstanceIDHandler::DeleteAllTokensForApp( |
| 32 const std::string& app_id, const DeleteTokenCallback& callback) { | 32 const std::string& app_id, |
| 33 DeleteToken(app_id, "*", "*", callback); | 33 bool use_subtype, |
| 34 const DeleteTokenCallback& callback) { |
| 35 DeleteToken(app_id, use_subtype, "*", "*", callback); |
| 34 } | 36 } |
| 35 | 37 |
| 36 GCMDriver::GCMDriver( | 38 GCMDriver::GCMDriver( |
| 37 const base::FilePath& store_path, | 39 const base::FilePath& store_path, |
| 38 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) | 40 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) |
| 39 : weak_ptr_factory_(this) { | 41 : weak_ptr_factory_(this) { |
| 40 // The |blocking_task_runner| can be NULL for tests that do not need the | 42 // The |blocking_task_runner| can be NULL for tests that do not need the |
| 41 // encryption capabilities of the GCMDriver class. | 43 // encryption capabilities of the GCMDriver class. |
| 42 if (blocking_task_runner) | 44 if (blocking_task_runner) |
| 43 encryption_provider_.Init(store_path, blocking_task_runner); | 45 encryption_provider_.Init(store_path, blocking_task_runner); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 GCMClient::Result result) { | 318 GCMClient::Result result) { |
| 317 // Invoke the original unregister callback. | 319 // Invoke the original unregister callback. |
| 318 unregister_callback.Run(result); | 320 unregister_callback.Run(result); |
| 319 | 321 |
| 320 // Trigger the pending registration. | 322 // Trigger the pending registration. |
| 321 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end()); | 323 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end()); |
| 322 RegisterImpl(app_id, normalized_sender_ids); | 324 RegisterImpl(app_id, normalized_sender_ids); |
| 323 } | 325 } |
| 324 | 326 |
| 325 } // namespace gcm | 327 } // namespace gcm |
| OLD | NEW |