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. |