Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: components/gcm_driver/gcm_driver_desktop.cc

Issue 340773006: Dispatch push event to worker from PushServiceImpl#OnMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Debugging. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698