summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/printer_query.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-01 08:40:39 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-01 08:40:39 +0000
commitc9c72089d6de5f55a25350956d2b2bdb980c7be5 (patch)
tree2fad3c53819b3d6e50bb572bcc682d897a04af71 /chrome/browser/printing/printer_query.cc
parentdf580c7af76c7eb33ec903f92d92d8738e41a2aa (diff)
downloadchromium_src-c9c72089d6de5f55a25350956d2b2bdb980c7be5.zip
chromium_src-c9c72089d6de5f55a25350956d2b2bdb980c7be5.tar.gz
chromium_src-c9c72089d6de5f55a25350956d2b2bdb980c7be5.tar.bz2
Printing: PrinterQuery gets created on the IO thread, not UI.
BUG=none TEST=No DCHECKs when printing. Review URL: http://codereview.chromium.org/5350005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/printer_query.cc')
-rw-r--r--chrome/browser/printing/printer_query.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index 0b776e2..c28f400 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -10,12 +10,12 @@
namespace printing {
PrinterQuery::PrinterQuery()
- : ui_message_loop_(MessageLoop::current()),
+ : io_message_loop_(MessageLoop::current()),
ALLOW_THIS_IN_INITIALIZER_LIST(worker_(new PrintJobWorker(this))),
is_print_dialog_box_shown_(false),
cookie_(PrintSettings::NewCookie()),
last_status_(PrintingContext::FAILED) {
- DCHECK_EQ(ui_message_loop_->type(), MessageLoop::TYPE_UI);
+ DCHECK_EQ(io_message_loop_->type(), MessageLoop::TYPE_IO);
}
PrinterQuery::~PrinterQuery() {
@@ -28,7 +28,6 @@ PrinterQuery::~PrinterQuery() {
callback_->Cancel();
}
// It may get deleted in a different thread that the one that created it.
- // That's fine so don't DCHECK_EQ(ui_message_loop_, MessageLoop::current());
}
void PrinterQuery::GetSettingsDone(const PrintSettings& new_settings,
@@ -64,7 +63,7 @@ void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
bool has_selection,
bool use_overlays,
CancelableTask* callback) {
- DCHECK_EQ(ui_message_loop_, MessageLoop::current());
+ DCHECK_EQ(io_message_loop_, MessageLoop::current());
DCHECK(!is_print_dialog_box_shown_);
DCHECK(!callback_.get());
DCHECK(worker_.get());