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/printer_job_handler.h" | 5 #include "chrome/service/cloud_print/printer_job_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 ret = true; | 171 ret = true; |
172 break; | 172 break; |
173 } | 173 } |
174 } | 174 } |
175 return ret; | 175 return ret; |
176 } | 176 } |
177 | 177 |
178 void PrinterJobHandler::OnAuthError() { | 178 void PrinterJobHandler::OnAuthError() { |
179 if (delegate_) | 179 if (delegate_) |
180 delegate_->OnAuthError(); | 180 delegate_->OnAuthError(); |
181 MessageLoop::current()->PostTask( | |
gene
2012/07/25 18:45:43
Move to the top of the function?
It probably does
Alex Yu
2012/07/25 18:51:44
Done.
| |
182 FROM_HERE, base::Bind(&PrinterJobHandler::Stop, this)) | |
181 } | 183 } |
182 | 184 |
183 void PrinterJobHandler::OnPrinterDeleted() { | 185 void PrinterJobHandler::OnPrinterDeleted() { |
184 if (delegate_) | 186 if (delegate_) |
185 delegate_->OnPrinterDeleted(printer_info_cloud_.printer_id); | 187 delegate_->OnPrinterDeleted(printer_info_cloud_.printer_id); |
186 } | 188 } |
187 | 189 |
188 void PrinterJobHandler::OnPrinterChanged() { | 190 void PrinterJobHandler::OnPrinterChanged() { |
189 printer_update_pending_ = true; | 191 printer_update_pending_ = true; |
190 if (!task_in_progress_) { | 192 if (!task_in_progress_) { |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
677 if (!job_spooler_ || !job_spooler_->Spool(job_details.print_ticket_, | 679 if (!job_spooler_ || !job_spooler_->Spool(job_details.print_ticket_, |
678 job_details.print_data_file_path_, | 680 job_details.print_data_file_path_, |
679 job_details.print_data_mime_type_, | 681 job_details.print_data_mime_type_, |
680 printer_name, | 682 printer_name, |
681 job_details.job_title_, | 683 job_details.job_title_, |
682 job_details.tags_, | 684 job_details.tags_, |
683 this)) { | 685 this)) { |
684 OnJobSpoolFailed(); | 686 OnJobSpoolFailed(); |
685 } | 687 } |
686 } | 688 } |
OLD | NEW |