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

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

Issue 5750003: Reland r68893 after fixing allowing blocking IO on shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable for Windows. Created 10 years 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/geolocation/geolocation_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/printer_query.cc
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index c28f400b7df495bfef23fea526efcc3642ffe638..7b73d869d3b957ac4126c1eeed9dba0186f9f2b8 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/printing/printer_query.h"
#include "base/message_loop.h"
+#include "base/thread_restrictions.h"
#include "chrome/browser/printing/print_job_worker.h"
namespace printing {
@@ -96,6 +97,10 @@ void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
void PrinterQuery::StopWorker() {
if (worker_.get()) {
+ // http://crbug.com/66082: We're blocking on the PrinterQuery's worker
+ // thread. It's not clear to me if this may result in blocking the current
+ // thread for an unacceptable time. We should probably fix it.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
worker_->Stop();
worker_.reset();
}
« no previous file with comments | « chrome/browser/geolocation/geolocation_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698