| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void DoShutdown(); | 62 void DoShutdown(); |
| 63 void DoRegisterSelectedPrinters( | 63 void DoRegisterSelectedPrinters( |
| 64 const printing::PrinterList& printer_list); | 64 const printing::PrinterList& printer_list); |
| 65 void DoUnregisterPrinters(); | 65 void DoUnregisterPrinters(); |
| 66 | 66 |
| 67 // CloudPrintAuth::Client implementation. | 67 // CloudPrintAuth::Client implementation. |
| 68 virtual void OnAuthenticationComplete( | 68 virtual void OnAuthenticationComplete( |
| 69 const std::string& access_token, | 69 const std::string& access_token, |
| 70 const std::string& robot_oauth_refresh_token, | 70 const std::string& robot_oauth_refresh_token, |
| 71 const std::string& robot_email, | 71 const std::string& robot_email, |
| 72 const std::string& user_email) OVERRIDE; | 72 const std::string& user_email) override; |
| 73 virtual void OnInvalidCredentials() OVERRIDE; | 73 virtual void OnInvalidCredentials() override; |
| 74 | 74 |
| 75 // CloudPrintConnector::Client implementation. | 75 // CloudPrintConnector::Client implementation. |
| 76 virtual void OnAuthFailed() OVERRIDE; | 76 virtual void OnAuthFailed() override; |
| 77 virtual void OnXmppPingUpdated(int ping_timeout) OVERRIDE; | 77 virtual void OnXmppPingUpdated(int ping_timeout) override; |
| 78 | 78 |
| 79 // notifier::PushClientObserver implementation. | 79 // notifier::PushClientObserver implementation. |
| 80 virtual void OnNotificationsEnabled() OVERRIDE; | 80 virtual void OnNotificationsEnabled() override; |
| 81 virtual void OnNotificationsDisabled( | 81 virtual void OnNotificationsDisabled( |
| 82 notifier::NotificationsDisabledReason reason) OVERRIDE; | 82 notifier::NotificationsDisabledReason reason) override; |
| 83 virtual void OnIncomingNotification( | 83 virtual void OnIncomingNotification( |
| 84 const notifier::Notification& notification) OVERRIDE; | 84 const notifier::Notification& notification) override; |
| 85 virtual void OnPingResponse() OVERRIDE; | 85 virtual void OnPingResponse() override; |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 friend class base::RefCountedThreadSafe<Core>; | 88 friend class base::RefCountedThreadSafe<Core>; |
| 89 | 89 |
| 90 virtual ~Core() {} | 90 virtual ~Core() {} |
| 91 | 91 |
| 92 void CreateAuthAndConnector(); | 92 void CreateAuthAndConnector(); |
| 93 void DestroyAuthAndConnector(); | 93 void DestroyAuthAndConnector(); |
| 94 | 94 |
| 95 // NotifyXXX is how the Core communicates with the frontend across | 95 // NotifyXXX is how the Core communicates with the frontend across |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 HandlePrinterNotification(notification.data); | 557 HandlePrinterNotification(notification.data); |
| 558 } | 558 } |
| 559 | 559 |
| 560 void CloudPrintProxyBackend::Core::OnPingResponse() { | 560 void CloudPrintProxyBackend::Core::OnPingResponse() { |
| 561 UMA_HISTOGRAM_COUNTS_100("CloudPrint.XmppPingTry", pending_xmpp_pings_); | 561 UMA_HISTOGRAM_COUNTS_100("CloudPrint.XmppPingTry", pending_xmpp_pings_); |
| 562 pending_xmpp_pings_ = 0; | 562 pending_xmpp_pings_ = 0; |
| 563 VLOG(1) << "CP_CONNECTOR: Ping response received."; | 563 VLOG(1) << "CP_CONNECTOR: Ping response received."; |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace cloud_print | 566 } // namespace cloud_print |
| OLD | NEW |