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

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: Proper fix. 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
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..2569472868b7cf6d9bf46093c6e9a0212fb0b2f9 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_->CancelURLFetcherOperations();
#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') | chrome/browser/media/webrtc_log_uploader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698