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

Unified Diff: media/audio/audio_manager.cc

Issue 2698503005: Remove unnecessary casts in AudioManagerDeleter on Mac. (Closed)
Patch Set: Fix friendship. Created 3 years, 10 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 | « media/audio/audio_manager.h ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager.cc
diff --git a/media/audio/audio_manager.cc b/media/audio/audio_manager.cc
index 2ff852b78cff3d9c67ff3d6710c2402eb088ef61..47f3ec842b86aa560026f748e851754c6781a894 100644
--- a/media/audio/audio_manager.cc
+++ b/media/audio/audio_manager.cc
@@ -6,6 +6,8 @@
#include <stdint.h>
+#include <utility>
Max Morin 2017/02/16 15:10:51 Linter wanted it for move.
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
@@ -287,9 +289,7 @@ void AudioManagerDeleter::operator()(const AudioManager* instance) const {
// uses a state that is destroyed in ~BrowserMainLoop().
// See http://crbug.com/623703 for more details.
DCHECK(instance->GetTaskRunner()->BelongsToCurrentThread());
- AudioManagerMac* mac_instance =
- static_cast<AudioManagerMac*>(const_cast<AudioManager*>(instance));
- delete mac_instance;
+ delete instance;
#else
// AudioManager must be destroyed on the audio thread.
if (!instance->GetTaskRunner()->DeleteSoon(FROM_HERE, instance)) {
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698