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

Unified Diff: ios/chrome/browser/ui/voice/text_to_speech_player.mm

Issue 2514873002: [ObjC ARC] Converts ios/chrome/browser/ui/voice:voice to ARC.Automatically generated ARCMigrate c… (Closed)
Patch Set: Created 4 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
Index: ios/chrome/browser/ui/voice/text_to_speech_player.mm
diff --git a/ios/chrome/browser/ui/voice/text_to_speech_player.mm b/ios/chrome/browser/ui/voice/text_to_speech_player.mm
index 184b1b00350c3432a1b9b95a383c4b16d9dd1cd7..ade4fa44692f0eb1665856ffe2d608e385eecb39 100644
--- a/ios/chrome/browser/ui/voice/text_to_speech_player.mm
+++ b/ios/chrome/browser/ui/voice/text_to_speech_player.mm
@@ -11,6 +11,10 @@
#import "ios/chrome/browser/ui/voice/text_to_speech_player+subclassing.h"
#import "ios/chrome/browser/ui/voice/voice_search_notification_names.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface TextToSpeechPlayer ()<AVAudioPlayerDelegate> {
// The audio data to be played.
base::scoped_nsobject<NSData> _audioData;
@@ -44,7 +48,6 @@
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self cancelPlayback];
- [super dealloc];
}
#pragma mark - Accessors
@@ -66,7 +69,7 @@
- (void)prepareToPlayAudioData:(NSData*)audioData {
if (self.playingAudio)
[self cancelPlayback];
- _audioData.reset([audioData retain]);
+ _audioData.reset(audioData);
[[NSNotificationCenter defaultCenter]
postNotificationName:kTTSAudioReadyForPlaybackNotification
object:self];
« no previous file with comments | « ios/chrome/browser/ui/voice/BUILD.gn ('k') | ios/chrome/browser/ui/voice/voice_search_notification_names.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698