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

Unified Diff: net/proxy/multi_threaded_proxy_resolver.cc

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 9 years, 11 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
Index: net/proxy/multi_threaded_proxy_resolver.cc
diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc
index ad1228c90b9a55a427022f97faf04230cd779e1d..c5922725e63daffaf0c76058242b29047a4fa353 100644
--- a/net/proxy/multi_threaded_proxy_resolver.cc
+++ b/net/proxy/multi_threaded_proxy_resolver.cc
@@ -8,6 +8,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_restrictions.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/proxy/proxy_info.h"
@@ -337,7 +338,12 @@ void MultiThreadedProxyResolver::Executor::Destroy() {
resolver_->Shutdown();
// Join the worker thread.
- thread_.reset();
+ {
+ // Allow IO because joining can block for a long time and is required
+ // by thread destructor.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ thread_.reset();
+ }
// Cancel any outstanding job.
if (outstanding_job_) {

Powered by Google App Engine
This is Rietveld 408576698