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

Unified Diff: chrome/browser/printing/print_view_manager_base.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/print_job.cc ('k') | chrome/browser/printing/printing_layout_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_view_manager_base.cc
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 84cabecc821d4cf54f973f0888eaaff63ca1480e..421bb1e890608e717ae0e01e54176b619a7cf320 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -324,9 +324,9 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
// to actually spool the pages, only to have the renderer generate them. Run
// a message loop until we get our signal that the print job is satisfied.
// PrintJob will send a ALL_PAGES_REQUESTED after having received all the
- // pages it needs. MessageLoop::current()->Quit() will be called as soon as
- // print_job_->document()->IsComplete() is true on either ALL_PAGES_REQUESTED
- // or in DidPrintPage(). The check is done in
+ // pages it needs. MessageLoop::current()->QuitWhenIdle() will be called as
+ // soon as print_job_->document()->IsComplete() is true on either
+ // ALL_PAGES_REQUESTED or in DidPrintPage(). The check is done in
// ShouldQuitFromInnerMessageLoop().
// BLOCKS until all the pages are received. (Need to enable recursive task)
if (!RunInnerMessageLoop()) {
@@ -345,7 +345,7 @@ void PrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
inside_inner_message_loop_) {
// We are in a message loop created by RenderAllMissingPagesNow. Quit from
// it.
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
inside_inner_message_loop_ = false;
}
}
@@ -451,9 +451,9 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
// memory-bound.
static const int kPrinterSettingsTimeout = 60000;
base::OneShotTimer quit_timer;
- quit_timer.Start(FROM_HERE,
- TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
- base::MessageLoop::current(), &base::MessageLoop::Quit);
+ quit_timer.Start(
+ FROM_HERE, TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
+ base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle);
inside_inner_message_loop_ = true;
« no previous file with comments | « chrome/browser/printing/print_job.cc ('k') | chrome/browser/printing/printing_layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698