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

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

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/md5.h" 9 #include "base/md5.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 29 matching lines...) Expand all
40 printer_info_(printer_info), 40 printer_info_(printer_info),
41 printer_info_cloud_(printer_info_cloud), 41 printer_info_cloud_(printer_info_cloud),
42 cloud_print_server_url_(cloud_print_server_url), 42 cloud_print_server_url_(cloud_print_server_url),
43 delegate_(delegate), 43 delegate_(delegate),
44 local_job_id_(-1), 44 local_job_id_(-1),
45 next_json_data_handler_(NULL), 45 next_json_data_handler_(NULL),
46 next_data_handler_(NULL), 46 next_data_handler_(NULL),
47 server_error_count_(0), 47 server_error_count_(0),
48 print_thread_("Chrome_CloudPrintJobPrintThread"), 48 print_thread_("Chrome_CloudPrintJobPrintThread"),
49 job_handler_message_loop_proxy_( 49 job_handler_message_loop_proxy_(
50 base::MessageLoopProxy::CreateForCurrentThread()), 50 base::MessageLoopProxy::current()),
51 shutting_down_(false), 51 shutting_down_(false),
52 job_check_pending_(false), 52 job_check_pending_(false),
53 printer_update_pending_(true), 53 printer_update_pending_(true),
54 printer_delete_pending_(false), 54 printer_delete_pending_(false),
55 task_in_progress_(false) { 55 task_in_progress_(false) {
56 } 56 }
57 57
58 bool PrinterJobHandler::Initialize() { 58 bool PrinterJobHandler::Initialize() {
59 if (print_system_->IsValidPrinter( 59 if (print_system_->IsValidPrinter(
60 printer_info_.printer_name)) { 60 printer_info_.printer_name)) {
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 } 681 }
682 682
683 void PrinterJobHandler::OnJobSpoolFailed() { 683 void PrinterJobHandler::OnJobSpoolFailed() {
684 DCHECK(MessageLoop::current() == print_thread_.message_loop()); 684 DCHECK(MessageLoop::current() == print_thread_.message_loop());
685 job_spooler_ = NULL; 685 job_spooler_ = NULL;
686 job_handler_message_loop_proxy_->PostTask(FROM_HERE, 686 job_handler_message_loop_proxy_->PostTask(FROM_HERE,
687 NewRunnableMethod(this, 687 NewRunnableMethod(this,
688 &PrinterJobHandler::JobFailed, 688 &PrinterJobHandler::JobFailed,
689 PRINT_FAILED)); 689 PRINT_FAILED));
690 } 690 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/print_system_win.cc ('k') | content/browser/geolocation/geolocation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698