OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 { | 1346 { |
1347 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); | 1347 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); |
1348 device::GamepadService::GetInstance()->Terminate(); | 1348 device::GamepadService::GetInstance()->Terminate(); |
1349 } | 1349 } |
1350 { | 1350 { |
1351 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); | 1351 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); |
1352 URLDataManager::DeleteDataSources(); | 1352 URLDataManager::DeleteDataSources(); |
1353 } | 1353 } |
1354 { | 1354 { |
1355 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:AudioMan"); | 1355 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:AudioMan"); |
1356 audio_manager_->Shutdown(); | 1356 if (!audio_manager_->Shutdown()) { |
| 1357 // Intentionally leak AudioManager if shutdown failed. |
| 1358 // We might run into various CHECK(s) in AudioManager destructor. |
| 1359 ignore_result(audio_manager_.release()); |
| 1360 } |
1357 } | 1361 } |
1358 | 1362 |
1359 if (parts_) { | 1363 if (parts_) { |
1360 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:PostDestroyThreads"); | 1364 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:PostDestroyThreads"); |
1361 parts_->PostDestroyThreads(); | 1365 parts_->PostDestroyThreads(); |
1362 } | 1366 } |
1363 } | 1367 } |
1364 | 1368 |
1365 #if !defined(OS_ANDROID) | 1369 #if !defined(OS_ANDROID) |
1366 cc::SurfaceManager* BrowserMainLoop::GetSurfaceManager() const { | 1370 cc::SurfaceManager* BrowserMainLoop::GetSurfaceManager() const { |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1783 base::MakeUnique<media::AudioThreadImpl>(), | 1787 base::MakeUnique<media::AudioThreadImpl>(), |
1784 MediaInternals::GetInstance()); | 1788 MediaInternals::GetInstance()); |
1785 } | 1789 } |
1786 CHECK(audio_manager_); | 1790 CHECK(audio_manager_); |
1787 | 1791 |
1788 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1792 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
1789 CHECK(audio_system_); | 1793 CHECK(audio_system_); |
1790 } | 1794 } |
1791 | 1795 |
1792 } // namespace content | 1796 } // namespace content |
OLD | NEW |