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/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 job_details.print_data_mime_type_, | 805 job_details.print_data_mime_type_, |
806 printer_name, | 806 printer_name, |
807 base::UTF16ToUTF8(document_name), | 807 base::UTF16ToUTF8(document_name), |
808 job_details.tags_, | 808 job_details.tags_, |
809 this)) { | 809 this)) { |
810 OnJobSpoolFailed(); | 810 OnJobSpoolFailed(); |
811 } | 811 } |
812 } | 812 } |
813 | 813 |
814 bool PrinterJobHandler::CurrentlyOnPrintThread() const { | 814 bool PrinterJobHandler::CurrentlyOnPrintThread() const { |
815 return base::MessageLoop::current() == print_thread_.message_loop(); | 815 return print_thread_.task_runner()->BelongsToCurrentThread(); |
816 } | 816 } |
817 | 817 |
818 } // namespace cloud_print | 818 } // namespace cloud_print |
OLD | NEW |