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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 211033006: Move destruction of WebRtcLogUploader to post threads teardown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fix to unit test + rebase. Created 6 years, 9 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 | « no previous file | chrome/browser/media/webrtc_log_uploader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index e87427b7971553ffc7a1788944d2c917979258e3..a67eb3549cc95a8f3969777d911966a66365673d 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -286,7 +286,9 @@ void BrowserProcessImpl::StartTearDown() {
platform_part()->StartTearDown();
#if defined(ENABLE_WEBRTC)
- webrtc_log_uploader_.reset();
+ // Cancel any uploads to release the system url request context references.
+ if (webrtc_log_uploader_)
+ webrtc_log_uploader_->StartShutdown();
#endif
if (local_state())
@@ -297,6 +299,11 @@ void BrowserProcessImpl::PostDestroyThreads() {
// With the file_thread_ flushed, we can release any icon resources.
icon_manager_.reset();
+#if defined(ENABLE_WEBRTC)
+ // Must outlive the file thread.
+ webrtc_log_uploader_.reset();
+#endif
+
// Reset associated state right after actual thread is stopped,
// as io_thread_.global_ cleanup happens in CleanUp on the IO
// thread, i.e. as the thread exits its message loop.
« no previous file with comments | « no previous file | chrome/browser/media/webrtc_log_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698