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

Unified Diff: net/proxy/dhcpcsvc_init_win.cc

Issue 1904273002: Enforce singleton not allowed behavior for CONTINUE_ON_SHUTDOWN tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made a Singleton leaky in test_support_android.cc Created 4 years, 5 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 | « base/threading/sequenced_worker_pool.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/dhcpcsvc_init_win.cc
diff --git a/net/proxy/dhcpcsvc_init_win.cc b/net/proxy/dhcpcsvc_init_win.cc
index 7e32aeae9cd5593b3d788341cdd5bc9f8d845ece..d243f1859aa3a3f446548e25a4eb9581d044e08f 100644
--- a/net/proxy/dhcpcsvc_init_win.cc
+++ b/net/proxy/dhcpcsvc_init_win.cc
@@ -19,15 +19,12 @@ class DhcpcsvcInitSingleton {
DWORD err = DhcpCApiInitialize(&version);
DCHECK(err == ERROR_SUCCESS); // DCHECK_EQ complains of unsigned mismatch.
}
-
- ~DhcpcsvcInitSingleton() {
- // Worker pool threads that use the DHCP API may still be running, so skip
- // cleanup.
- }
};
-static base::LazyInstance<DhcpcsvcInitSingleton> g_dhcpcsvc_init_singleton =
- LAZY_INSTANCE_INITIALIZER;
+// Worker pool threads that use the DHCP API may still be running at shutdown.
+// Leak instance and skip cleanup.
+static base::LazyInstance<DhcpcsvcInitSingleton>::Leaky
+ g_dhcpcsvc_init_singleton = LAZY_INSTANCE_INITIALIZER;
} // namespace
« no previous file with comments | « base/threading/sequenced_worker_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698