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 "chrome/service/cloud_print/cloud_print_proxy_backend.h" | 5 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 543 |
544 | 544 |
545 void CloudPrintProxyBackend::Core::OnIncomingNotification( | 545 void CloudPrintProxyBackend::Core::OnIncomingNotification( |
546 const notifier::Notification& notification) { | 546 const notifier::Notification& notification) { |
547 // Since we got some notification from the server, | 547 // Since we got some notification from the server, |
548 // reset pending ping counter to 0. | 548 // reset pending ping counter to 0. |
549 pending_xmpp_pings_ = 0; | 549 pending_xmpp_pings_ = 0; |
550 | 550 |
551 DCHECK(base::MessageLoop::current() == backend_->core_thread_.message_loop()); | 551 DCHECK(base::MessageLoop::current() == backend_->core_thread_.message_loop()); |
552 VLOG(1) << "CP_CONNECTOR: Incoming notification."; | 552 VLOG(1) << "CP_CONNECTOR: Incoming notification."; |
553 if (0 == base::strcasecmp(kCloudPrintPushNotificationsSource, | 553 if (base::EqualsCaseInsensitiveASCII(kCloudPrintPushNotificationsSource, |
554 notification.channel.c_str())) | 554 notification.channel)) |
555 HandlePrinterNotification(notification.data); | 555 HandlePrinterNotification(notification.data); |
556 } | 556 } |
557 | 557 |
558 void CloudPrintProxyBackend::Core::OnPingResponse() { | 558 void CloudPrintProxyBackend::Core::OnPingResponse() { |
559 UMA_HISTOGRAM_COUNTS_100("CloudPrint.XmppPingTry", pending_xmpp_pings_); | 559 UMA_HISTOGRAM_COUNTS_100("CloudPrint.XmppPingTry", pending_xmpp_pings_); |
560 pending_xmpp_pings_ = 0; | 560 pending_xmpp_pings_ = 0; |
561 VLOG(1) << "CP_CONNECTOR: Ping response received."; | 561 VLOG(1) << "CP_CONNECTOR: Ping response received."; |
562 } | 562 } |
563 | 563 |
564 } // namespace cloud_print | 564 } // namespace cloud_print |
OLD | NEW |