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

Unified Diff: ios/chrome/browser/ui/commands/show_mail_composer_command.mm

Issue 1124173004: [iOS] Upstream //ios/chrome/browser/ui/commands changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation Created 5 years, 7 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
Index: ios/chrome/browser/ui/commands/show_mail_composer_command.mm
diff --git a/ios/chrome/browser/ui/commands/show_mail_composer_command.mm b/ios/chrome/browser/ui/commands/show_mail_composer_command.mm
index 5133f59fd0fbe91bcef3007d03564ca71fb46b45..6fbf4e6ebb1b09a5efaadaeb8f73c5d74512872b 100644
--- a/ios/chrome/browser/ui/commands/show_mail_composer_command.mm
+++ b/ios/chrome/browser/ui/commands/show_mail_composer_command.mm
@@ -14,26 +14,29 @@
base::scoped_nsobject<NSString> _subject;
base::scoped_nsobject<NSString> _body;
base::FilePath _textFileToAttach;
- // Alert message ids for the case when no email account is configured.
- int _emailNotConfiguredAlertTitleId;
- int _emailNotConfiguredAlertMessageId;
}
-@synthesize textFileToAttach;
+@synthesize emailNotConfiguredAlertTitleId = _emailNotConfiguredAlertTitleId;
+@synthesize emailNotConfiguredAlertMessageId =
+ _emailNotConfiguredAlertMessageId;
-- (id)initWithToRecipient:(NSString*)toRecipient
+- (instancetype)initWithTag:(NSInteger)tag {
+ NOTREACHED();
+ return nil;
+}
+
+- (instancetype)initWithToRecipient:(NSString*)toRecipient
subject:(NSString*)subject
body:(NSString*)body
emailNotConfiguredAlertTitleId:(int)alertTitleId
emailNotConfiguredAlertMessageId:(int)alertMessageId {
DCHECK(alertTitleId);
DCHECK(alertMessageId);
- self = [super init];
+ self = [super initWithTag:IDC_SHOW_MAIL_COMPOSER];
if (self) {
- self.tag = IDC_SHOW_MAIL_COMPOSER;
_toRecipients.reset([@[ toRecipient ] retain]);
- _subject.reset([subject retain]);
- _body.reset([body retain]);
+ _subject.reset([subject copy]);
+ _body.reset([body copy]);
_emailNotConfiguredAlertTitleId = alertTitleId;
_emailNotConfiguredAlertMessageId = alertMessageId;
}
@@ -52,12 +55,12 @@
return _body.get();
}
-- (int)emailNotConfiguredAlertTitleId {
- return _emailNotConfiguredAlertTitleId;
+- (const base::FilePath&)textFileToAttach {
+ return _textFileToAttach;
}
-- (int)emailNotConfiguredAlertMessageId {
- return _emailNotConfiguredAlertMessageId;
+- (void)setTextFileToAttach:(const base::FilePath&)textFileToAttach {
+ _textFileToAttach = textFileToAttach;
}
@end
« no previous file with comments | « ios/chrome/browser/ui/commands/show_mail_composer_command.h ('k') | ios/chrome/browser/ui/commands/show_signin_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698