| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "jingle/notifier/listener/non_blocking_push_client.h" | 5 #include "jingle/notifier/listener/non_blocking_push_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| 11 #include "jingle/notifier/listener/push_client_observer.h" | 11 #include "jingle/notifier/listener/push_client_observer.h" |
| 12 | 12 |
| 13 namespace notifier { | 13 namespace notifier { |
| 14 | 14 |
| 15 // All methods are called on the delegate thread unless specified | 15 // All methods are called on the delegate thread unless specified |
| 16 // otherwise. | 16 // otherwise. |
| 17 class NonBlockingPushClient::Core | 17 class NonBlockingPushClient::Core |
| 18 : public base::RefCountedThreadSafe<NonBlockingPushClient::Core>, | 18 : public base::RefCountedThreadSafe<NonBlockingPushClient::Core>, |
| 19 public PushClientObserver { | 19 public PushClientObserver { |
| 20 public: | 20 public: |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 FOR_EACH_OBSERVER(PushClientObserver, observers_, | 237 FOR_EACH_OBSERVER(PushClientObserver, observers_, |
| 238 OnIncomingNotification(notification)); | 238 OnIncomingNotification(notification)); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void NonBlockingPushClient::OnPingResponse() { | 241 void NonBlockingPushClient::OnPingResponse() { |
| 242 DCHECK(thread_checker_.CalledOnValidThread()); | 242 DCHECK(thread_checker_.CalledOnValidThread()); |
| 243 FOR_EACH_OBSERVER(PushClientObserver, observers_, OnPingResponse()); | 243 FOR_EACH_OBSERVER(PushClientObserver, observers_, OnPingResponse()); |
| 244 } | 244 } |
| 245 | 245 |
| 246 } // namespace notifier | 246 } // namespace notifier |
| OLD | NEW |