| Index: ios/chrome/browser/translate/before_translate_infobar_controller.mm
|
| diff --git a/ios/chrome/browser/translate/before_translate_infobar_controller.mm b/ios/chrome/browser/translate/before_translate_infobar_controller.mm
|
| index 462ef17ab43d714057479988d2f310030333c780..59e97ee1c5b0853a56195288bf10ffb6af1277fc 100644
|
| --- a/ios/chrome/browser/translate/before_translate_infobar_controller.mm
|
| +++ b/ios/chrome/browser/translate/before_translate_infobar_controller.mm
|
| @@ -7,6 +7,7 @@
|
| #include <stddef.h>
|
| #import <UIKit/UIKit.h>
|
|
|
| +#include "base/ios/weak_nsobject.h"
|
| #include "base/logging.h"
|
| #include "base/mac/scoped_nsobject.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| @@ -172,9 +173,11 @@ - (void)updateInfobarLabelOnView:(InfoBarView*)view {
|
| NSString* label =
|
| l10n_util::GetNSStringF(IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE_IOS,
|
| originalLanguageWithLink, targetLanguageWithLink);
|
| +
|
| + base::WeakNSObject<BeforeTranslateInfoBarController> weakSelf(self);
|
| [view addLabel:label
|
| action:^(NSUInteger tag) {
|
| - [self infobarLinkDidPress:tag];
|
| + [weakSelf infobarLinkDidPress:tag];
|
| }];
|
| }
|
|
|
|
|