Commit 188ae61d authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Fix changing source language bug in Translate

This change also removes unused delegate method implementations.

Fixed: 1035814
Change-Id: I2eff464a042b5a6917cad9da4e61daf8969672d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1986035Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728620}
parent 5bf451c4
......@@ -420,18 +420,6 @@ NSString* const kTranslateNotificationSnackbarCategory =
// TODO(crbug.com/1014959): implement else logic. Should aything be done?
}
#pragma mark - InfobarTranslateLanguageSelectionDelegate
- (void)didSelectSourceLanguageIndex:(int)languageIndex
withName:(NSString*)languageName {
// TODO(crbug.com/1014959): Implement.
}
- (void)didSelectTargetLanguageIndex:(int)languageIndex
withName:(NSString*)languageName {
// TODO(crbug.com/1014959): Implement.
}
#pragma mark - Private
// Helper method for performInfobarAction, which also allows for
......
......@@ -186,9 +186,9 @@ const int kInvalidLanguageIndex = -1;
base::string16 targetLanguage =
self.translateInfobarDelegate->target_language_name();
if (self.newSourceLanguageIndex != kInvalidLanguageIndex) {
if (self.newTargetLanguageIndex != kInvalidLanguageIndex) {
targetLanguage = self.translateInfobarDelegate->language_name_at(
self.newSourceLanguageIndex);
self.newTargetLanguageIndex);
}
[self.modalConsumer
setupModalViewControllerWithPrefs:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment