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

Unified Diff: ash/system/win/audio/tray_audio_delegate_win.cc

Issue 720753003: Remove implicit conversions from scoped_refptr to T* in ash/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix formatting Created 6 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/win/audio/tray_audio_delegate_win.cc
diff --git a/ash/system/win/audio/tray_audio_delegate_win.cc b/ash/system/win/audio/tray_audio_delegate_win.cc
index a351221e76d480f150c8bd1afb4d44af47c04827..18e46af3bdd968f68c6f17d76367beef154eb7d8 100644
--- a/ash/system/win/audio/tray_audio_delegate_win.cc
+++ b/ash/system/win/audio/tray_audio_delegate_win.cc
@@ -36,7 +36,7 @@ int TrayAudioDelegateWin::GetOutputDefaultVolumeMuteLevel() {
int TrayAudioDelegateWin::GetOutputVolumeLevel() {
ScopedComPtr<ISimpleAudioVolume> volume_control =
CreateDefaultVolumeControl();
- if (!volume_control)
+ if (!volume_control.get())
return 0;
float level = 0.0f;
@@ -61,7 +61,7 @@ bool TrayAudioDelegateWin::IsOutputAudioMuted() {
ScopedComPtr<ISimpleAudioVolume> volume_control =
CreateDefaultVolumeControl();
- if (!volume_control)
+ if (!volume_control.get())
return false;
BOOL mute = FALSE;
@@ -75,7 +75,7 @@ void TrayAudioDelegateWin::SetOutputAudioIsMuted(bool is_muted) {
ScopedComPtr<ISimpleAudioVolume> volume_control =
CreateDefaultVolumeControl();
- if (!volume_control)
+ if (!volume_control.get())
return;
volume_control->SetMute(is_muted, NULL);
@@ -85,7 +85,7 @@ void TrayAudioDelegateWin::SetOutputVolumeLevel(int level) {
ScopedComPtr<ISimpleAudioVolume> volume_control =
CreateDefaultVolumeControl();
- if (!volume_control)
+ if (!volume_control.get())
return;
float volume_level = static_cast<float>(level) / 100.0f;
@@ -103,9 +103,9 @@ TrayAudioDelegateWin::CreateDefaultVolumeControl() {
ScopedComPtr<IMMDevice> device =
media::CoreAudioUtil::CreateDefaultDevice(eRender, eConsole);
- if (!device ||
+ if (!device.get() ||
FAILED(device->Activate(__uuidof(IAudioSessionManager), CLSCTX_ALL, NULL,
- session_manager.ReceiveVoid()))) {
+ session_manager.ReceiveVoid()))) {
return volume_control;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698