Index: chrome/service/cloud_print/cloud_print_proxy_backend.cc |
=================================================================== |
--- chrome/service/cloud_print/cloud_print_proxy_backend.cc (revision 50281) |
+++ chrome/service/cloud_print/cloud_print_proxy_backend.cc (working copy) |
@@ -290,6 +290,7 @@ |
const std::string cloud_print_xmpp_token, |
const std::string email, const std::string& proxy_id) { |
DCHECK(MessageLoop::current() == backend_->core_thread_.message_loop()); |
+ LOG(INFO) << "CP_PROXY: Starting proxy, id: " << proxy_id; |
print_system_ = |
cloud_print::PrintSystem::CreateInstance(print_system_settings_.get()); |
@@ -339,6 +340,7 @@ |
} |
void CloudPrintProxyBackend::Core::DoShutdown() { |
+ LOG(INFO) << "CP_PROXY: Shutdown proxy."; |
sanjeevr
2010/06/25 20:39:42
Trace proxy id here as well
|
if (print_server_watcher_ != NULL) |
print_server_watcher_->StopWatching(); |
@@ -364,6 +366,7 @@ |
void CloudPrintProxyBackend::Core::DoHandlePrinterNotification( |
const std::string& printer_id) { |
+ LOG(INFO) << "CP_PROXY: Handle printer notification, id: " << printer_id; |
JobHandlerMap::iterator index = job_handler_map_.find(printer_id); |
if (index != job_handler_map_.end()) |
index->second->NotifyJobAvailable(); |
@@ -418,7 +421,7 @@ |
for (it = info.options.begin(); it != info.options.end(); ++it) { |
// TODO(gene) Escape '=' char from name. Warning for now. |
if (it->first.find('=') != std::string::npos) { |
- LOG(WARNING) << "CUPS option name contains '=' character"; |
+ LOG(WARNING) << "CP_PROXY: CUPS option name contains '=' character"; |
NOTREACHED(); |
} |
std::string msg(it->first); |
@@ -456,7 +459,8 @@ |
&CloudPrintProxyBackend::Core::HandleRegisterPrinterResponse; |
request_->Start(); |
} else { |
- LOG(ERROR) << "CP: Failed to get printer info for: " << info.printer_name; |
+ LOG(ERROR) << "CP_PROXY: Failed to get printer info for: " << |
+ info.printer_name; |
next_upload_index_++; |
MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, |
&CloudPrintProxyBackend::Core::RegisterNextPrinter)); |
@@ -546,6 +550,7 @@ |
std::string printer_id; |
printer_data->GetString(kIdValue, &printer_id); |
DCHECK(!printer_id.empty()); |
+ LOG(INFO) << "CP_PROXY: Init job handler for printer id: " << printer_id; |
JobHandlerMap::iterator index = job_handler_map_.find(printer_id); |
// We might already have a job handler for this printer |
if (index == job_handler_map_.end()) { |
@@ -571,6 +576,8 @@ |
const URLFetcher* source, const GURL& url, const URLRequestStatus& status, |
int response_code, const ResponseCookies& cookies, |
const std::string& data) { |
+ LOG(INFO) << "CP_PROXY: Handle register printer response, code: " << |
+ response_code; |
Task* next_task = |
NewRunnableMethod(this, |
&CloudPrintProxyBackend::Core::RegisterNextPrinter); |
@@ -600,6 +607,7 @@ |
} |
void CloudPrintProxyBackend::Core::HandleServerError(Task* task_to_retry) { |
+ LOG(INFO) << "CP_PROXY: Server error."; |
CloudPrintHelpers::HandleServerError( |
&server_error_count_, -1, kMaxRetryInterval, kBaseRetryInterval, |
task_to_retry, NULL); |
@@ -625,6 +633,7 @@ |
void CloudPrintProxyBackend::Core::OnIncomingNotification( |
const IncomingNotificationData& notification_data) { |
+ LOG(INFO) << "CP_PROXY: Incoming notification."; |
if (0 == base::strcasecmp(kCloudPrintTalkServiceUrl, |
notification_data.service_url.c_str())) { |
backend_->core_thread_.message_loop()->PostTask( |
@@ -649,6 +658,7 @@ |
// PrinterJobHandler::Delegate implementation |
void CloudPrintProxyBackend::Core::OnPrinterJobHandlerShutdown( |
PrinterJobHandler* job_handler, const std::string& printer_id) { |
+ LOG(INFO) << "CP_PROXY: Printer job handle shutdown, id " << printer_id; |
job_handler_map_.erase(printer_id); |
} |