Use std::string::empty to check

This commit is contained in:
Zhuo Lu 2018-01-16 19:00:39 -08:00
parent 1e1087abbb
commit 75b990faff

View file

@ -48,10 +48,10 @@ void CocoaNotification::Show(const NotificationOptions& options) {
if (options.silent) {
[notification_ setSoundName:nil];
} else if (options.sound != nil) {
[notification_ setSoundName:base::SysUTF16ToNSString(options.sound)];
} else {
} else if (options.sound.empty()) {
[notification_ setSoundName:NSUserNotificationDefaultSoundName];
} else {
[notification_ setSoundName:base::SysUTF16ToNSString(options.sound)];
}
[notification_ setHasActionButton:false];