Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/service/cloud_print/printer_job_handler.cc

Issue 2110603002: Remove calls to MessageLoop::current() in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy_backend.cc ('k') | chrome/utility/image_writer/disk_unmounter_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698