| 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 gcm_started_ = false; | 628 gcm_started_ = false; |
| 629 gcm_client_ready_ = false; | 629 gcm_client_ready_ = false; |
| 630 delayed_task_controller_.reset(); | 630 delayed_task_controller_.reset(); |
| 631 ClearCallbacks(); | 631 ClearCallbacks(); |
| 632 } | 632 } |
| 633 | 633 |
| 634 void GCMDriverDesktop::MessageReceived( | 634 void GCMDriverDesktop::MessageReceived( |
| 635 const std::string& app_id, | 635 const std::string& app_id, |
| 636 const GCMClient::IncomingMessage& message) { | 636 const GCMClient::IncomingMessage& message) { |
| 637 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); | 637 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); |
| 638 | 638 LOG(WARNING) << "Message received for appid: " << app_id; |
| 639 // Drop the event if the service has been stopped. | 639 // Drop the event if the service has been stopped. |
| 640 if (!gcm_started_) | 640 if (!gcm_started_) |
| 641 return; | 641 return; |
| 642 | 642 |
| 643 GetAppHandler(app_id)->OnMessage(app_id, message); | 643 GetAppHandler(app_id)->OnMessage(app_id, message); |
| 644 } | 644 } |
| 645 | 645 |
| 646 void GCMDriverDesktop::MessagesDeleted(const std::string& app_id) { | 646 void GCMDriverDesktop::MessagesDeleted(const std::string& app_id) { |
| 647 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); | 647 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); |
| 648 | 648 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 | 717 |
| 718 // Normally request_gcm_statistics_callback_ would not be null. | 718 // Normally request_gcm_statistics_callback_ would not be null. |
| 719 if (!request_gcm_statistics_callback_.is_null()) | 719 if (!request_gcm_statistics_callback_.is_null()) |
| 720 request_gcm_statistics_callback_.Run(stats); | 720 request_gcm_statistics_callback_.Run(stats); |
| 721 else | 721 else |
| 722 LOG(WARNING) << "request_gcm_statistics_callback_ is NULL."; | 722 LOG(WARNING) << "request_gcm_statistics_callback_ is NULL."; |
| 723 } | 723 } |
| 724 | 724 |
| 725 } // namespace gcm | 725 } // namespace gcm |
| 726 | 726 |
| OLD | NEW |