diff options
Diffstat (limited to 'chromium/jingle')
| -rw-r--r-- | chromium/jingle/BUILD.gn | 23 | ||||
| -rw-r--r-- | chromium/jingle/jingle.gypi | 25 | ||||
| -rw-r--r-- | chromium/jingle/notifier/listener/fake_push_client.cc | 12 | ||||
| -rw-r--r-- | chromium/jingle/notifier/listener/non_blocking_push_client.cc | 15 | ||||
| -rw-r--r-- | chromium/jingle/notifier/listener/xmpp_push_client.cc | 24 |
5 files changed, 43 insertions, 56 deletions
diff --git a/chromium/jingle/BUILD.gn b/chromium/jingle/BUILD.gn index 0c14ac726ef..1c16c144c24 100644 --- a/chromium/jingle/BUILD.gn +++ b/chromium/jingle/BUILD.gn @@ -6,13 +6,24 @@ import("//build/config/features.gni") import("//testing/test.gni") if (enable_webrtc || !is_android) { - jingle_includes = exec_script("//build/gypi_to_gn.py", - [ rebase_path("jingle.gypi") ], - "scope", - [ "jingle.gypi" ]) - static_library("jingle_glue") { - sources = jingle_includes.jingle_glue_sources + sources = [ + "glue/chrome_async_socket.cc", + "glue/chrome_async_socket.h", + "glue/fake_ssl_client_socket.cc", + "glue/fake_ssl_client_socket.h", + "glue/proxy_resolving_client_socket.cc", + "glue/proxy_resolving_client_socket.h", + "glue/resolving_client_socket_factory.h", + "glue/task_pump.cc", + "glue/task_pump.h", + "glue/thread_wrapper.cc", + "glue/thread_wrapper.h", + "glue/utils.cc", + "glue/utils.h", + "glue/xmpp_client_socket_factory.cc", + "glue/xmpp_client_socket_factory.h", + ] public_deps = [ "//third_party/libjingle", ] diff --git a/chromium/jingle/jingle.gypi b/chromium/jingle/jingle.gypi deleted file mode 100644 index 339ef59c625..00000000000 --- a/chromium/jingle/jingle.gypi +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'jingle_glue_sources': [ - 'glue/chrome_async_socket.cc', - 'glue/chrome_async_socket.h', - 'glue/fake_ssl_client_socket.cc', - 'glue/fake_ssl_client_socket.h', - 'glue/proxy_resolving_client_socket.cc', - 'glue/proxy_resolving_client_socket.h', - 'glue/resolving_client_socket_factory.h', - 'glue/task_pump.cc', - 'glue/task_pump.h', - 'glue/thread_wrapper.cc', - 'glue/thread_wrapper.h', - 'glue/utils.cc', - 'glue/utils.h', - 'glue/xmpp_client_socket_factory.cc', - 'glue/xmpp_client_socket_factory.h', - ] - } -} diff --git a/chromium/jingle/notifier/listener/fake_push_client.cc b/chromium/jingle/notifier/listener/fake_push_client.cc index 1106c932b7f..7225408ced7 100644 --- a/chromium/jingle/notifier/listener/fake_push_client.cc +++ b/chromium/jingle/notifier/listener/fake_push_client.cc @@ -40,20 +40,20 @@ void FakePushClient::SendPing() { } void FakePushClient::EnableNotifications() { - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnNotificationsEnabled()); + for (auto& observer : observers_) + observer.OnNotificationsEnabled(); } void FakePushClient::DisableNotifications( NotificationsDisabledReason reason) { - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnNotificationsDisabled(reason)); + for (auto& observer : observers_) + observer.OnNotificationsDisabled(reason); } void FakePushClient::SimulateIncomingNotification( const Notification& notification) { - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnIncomingNotification(notification)); + for (auto& observer : observers_) + observer.OnIncomingNotification(notification); } const SubscriptionList& FakePushClient::subscriptions() const { diff --git a/chromium/jingle/notifier/listener/non_blocking_push_client.cc b/chromium/jingle/notifier/listener/non_blocking_push_client.cc index 4596657aa63..4b7309d1373 100644 --- a/chromium/jingle/notifier/listener/non_blocking_push_client.cc +++ b/chromium/jingle/notifier/listener/non_blocking_push_client.cc @@ -218,27 +218,28 @@ void NonBlockingPushClient::SendPing() { void NonBlockingPushClient::OnNotificationsEnabled() { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnNotificationsEnabled()); + for (auto& observer : observers_) + observer.OnNotificationsEnabled(); } void NonBlockingPushClient::OnNotificationsDisabled( NotificationsDisabledReason reason) { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnNotificationsDisabled(reason)); + for (auto& observer : observers_) + observer.OnNotificationsDisabled(reason); } void NonBlockingPushClient::OnIncomingNotification( const Notification& notification) { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnIncomingNotification(notification)); + for (auto& observer : observers_) + observer.OnIncomingNotification(notification); } void NonBlockingPushClient::OnPingResponse() { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, OnPingResponse()); + for (auto& observer : observers_) + observer.OnPingResponse(); } } // namespace notifier diff --git a/chromium/jingle/notifier/listener/xmpp_push_client.cc b/chromium/jingle/notifier/listener/xmpp_push_client.cc index 4083e23d417..0fe9c88cf8a 100644 --- a/chromium/jingle/notifier/listener/xmpp_push_client.cc +++ b/chromium/jingle/notifier/listener/xmpp_push_client.cc @@ -63,41 +63,41 @@ void XmppPushClient::OnTransientDisconnection() { DCHECK(thread_checker_.CalledOnValidThread()); DVLOG(1) << "Push: Transient disconnection"; base_task_.reset(); - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR)); + for (auto& observer : observers_) + observer.OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR); } void XmppPushClient::OnCredentialsRejected() { DCHECK(thread_checker_.CalledOnValidThread()); DVLOG(1) << "Push: Credentials rejected"; base_task_.reset(); - FOR_EACH_OBSERVER( - PushClientObserver, observers_, - OnNotificationsDisabled(NOTIFICATION_CREDENTIALS_REJECTED)); + for (auto& observer : observers_) + observer.OnNotificationsDisabled(NOTIFICATION_CREDENTIALS_REJECTED); } void XmppPushClient::OnNotificationReceived( const Notification& notification) { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnIncomingNotification(notification)); + for (auto& observer : observers_) + observer.OnIncomingNotification(notification); } void XmppPushClient::OnPingResponseReceived() { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, OnPingResponse()); + for (auto& observer : observers_) + observer.OnPingResponse(); } void XmppPushClient::OnSubscribed() { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnNotificationsEnabled()); + for (auto& observer : observers_) + observer.OnNotificationsEnabled(); } void XmppPushClient::OnSubscriptionError() { DCHECK(thread_checker_.CalledOnValidThread()); - FOR_EACH_OBSERVER(PushClientObserver, observers_, - OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR)); + for (auto& observer : observers_) + observer.OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR); } void XmppPushClient::AddObserver(PushClientObserver* observer) { |
