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_desktop.h" | 5 #include "components/gcm_driver/gcm_driver_desktop.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 } | 515 } |
516 | 516 |
517 io_thread_->PostTask( | 517 io_thread_->PostTask( |
518 FROM_HERE, | 518 FROM_HERE, |
519 base::Bind(&GCMDriverDesktop::IOWorker::Register, | 519 base::Bind(&GCMDriverDesktop::IOWorker::Register, |
520 base::Unretained(io_worker_.get()), | 520 base::Unretained(io_worker_.get()), |
521 app_id, | 521 app_id, |
522 sender_ids)); | 522 sender_ids)); |
523 } | 523 } |
524 | 524 |
525 void GCMDriverDesktop::UnregisterImpl(const std::string& app_id) { | 525 void GCMDriverDesktop::UnregisterImpl( |
| 526 const std::string& app_id, const std::vector<std::string>& /*sender_ids*/) { |
526 // Delay the unregister operation until GCMClient is ready. | 527 // Delay the unregister operation until GCMClient is ready. |
527 if (!delayed_task_controller_->CanRunTaskWithoutDelay()) { | 528 if (!delayed_task_controller_->CanRunTaskWithoutDelay()) { |
528 delayed_task_controller_->AddTask( | 529 delayed_task_controller_->AddTask( |
529 base::Bind(&GCMDriverDesktop::DoUnregister, | 530 base::Bind(&GCMDriverDesktop::DoUnregister, |
530 weak_ptr_factory_.GetWeakPtr(), | 531 weak_ptr_factory_.GetWeakPtr(), |
531 app_id)); | 532 app_id)); |
532 return; | 533 return; |
533 } | 534 } |
534 | 535 |
535 DoUnregister(app_id); | 536 DoUnregister(app_id); |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); | 835 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); |
835 | 836 |
836 // Normally request_gcm_statistics_callback_ would not be null. | 837 // Normally request_gcm_statistics_callback_ would not be null. |
837 if (!request_gcm_statistics_callback_.is_null()) | 838 if (!request_gcm_statistics_callback_.is_null()) |
838 request_gcm_statistics_callback_.Run(stats); | 839 request_gcm_statistics_callback_.Run(stats); |
839 else | 840 else |
840 LOG(WARNING) << "request_gcm_statistics_callback_ is NULL."; | 841 LOG(WARNING) << "request_gcm_statistics_callback_ is NULL."; |
841 } | 842 } |
842 | 843 |
843 } // namespace gcm | 844 } // namespace gcm |
OLD | NEW |