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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 const gaia::OAuthClientInfo& oauth_client_info, | 168 const gaia::OAuthClientInfo& oauth_client_info, |
169 bool enable_job_poll) | 169 bool enable_job_poll) |
170 : core_thread_("Chrome_CloudPrintProxyCoreThread"), | 170 : core_thread_("Chrome_CloudPrintProxyCoreThread"), |
171 frontend_loop_(MessageLoop::current()), | 171 frontend_loop_(MessageLoop::current()), |
172 frontend_(frontend) { | 172 frontend_(frontend) { |
173 DCHECK(frontend_); | 173 DCHECK(frontend_); |
174 core_ = new Core(this, settings, oauth_client_info, enable_job_poll); | 174 core_ = new Core(this, settings, oauth_client_info, enable_job_poll); |
175 } | 175 } |
176 | 176 |
177 CloudPrintProxyBackend::~CloudPrintProxyBackend() { | 177 CloudPrintProxyBackend::~CloudPrintProxyBackend() { |
178 DCHECK(!core_); | 178 DCHECK(!core_.get()); |
179 } | 179 } |
180 | 180 |
181 bool CloudPrintProxyBackend::InitializeWithLsid( | 181 bool CloudPrintProxyBackend::InitializeWithLsid( |
182 const std::string& lsid, | 182 const std::string& lsid, |
183 const std::string& last_robot_refresh_token, | 183 const std::string& last_robot_refresh_token, |
184 const std::string& last_robot_email, | 184 const std::string& last_robot_email, |
185 const std::string& last_user_email) { | 185 const std::string& last_user_email) { |
186 if (!core_thread_.Start()) | 186 if (!core_thread_.Start()) |
187 return false; | 187 return false; |
188 core_thread_.message_loop()->PostTask( | 188 core_thread_.message_loop()->PostTask( |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 if (0 == base::strcasecmp(kCloudPrintPushNotificationsSource, | 569 if (0 == base::strcasecmp(kCloudPrintPushNotificationsSource, |
570 notification.channel.c_str())) | 570 notification.channel.c_str())) |
571 HandlePrinterNotification(notification.data); | 571 HandlePrinterNotification(notification.data); |
572 } | 572 } |
573 | 573 |
574 void CloudPrintProxyBackend::Core::OnPingResponse() { | 574 void CloudPrintProxyBackend::Core::OnPingResponse() { |
575 pending_xmpp_pings_ = 0; | 575 pending_xmpp_pings_ = 0; |
576 VLOG(1) << "CP_CONNECTOR: Ping response received."; | 576 VLOG(1) << "CP_CONNECTOR: Ping response received."; |
577 } | 577 } |
578 | 578 |
OLD | NEW |