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

Unified Diff: ios/web_view/internal/translate/web_view_translate_client.mm

Issue 2762023003: Enable ARC for //ios/web_view/internal/translate/*.m. (Closed)
Patch Set: Apply review comments. Created 3 years, 9 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
« no previous file with comments | « ios/web_view/internal/translate/web_view_translate_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/internal/translate/web_view_translate_client.mm
diff --git a/ios/web_view/internal/translate/web_view_translate_client.mm b/ios/web_view/internal/translate/web_view_translate_client.mm
index 188e9de88cbafa496ea03cdbc858220934796e95..d0f717101e66fa42089be8b1c488392cc072b03f 100644
--- a/ios/web_view/internal/translate/web_view_translate_client.mm
+++ b/ios/web_view/internal/translate/web_view_translate_client.mm
@@ -26,6 +26,10 @@
#import "ios/web_view/public/cwv_translate_delegate.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
DEFINE_WEB_STATE_USER_DATA_KEY(ios_web_view::WebViewTranslateClient);
namespace ios_web_view {
@@ -55,7 +59,7 @@ void WebViewTranslateClient::ShowTranslateUI(
const std::string& target_language,
translate::TranslateErrors::Type error_type,
bool triggered_from_menu) {
- if (!delegate_)
+ if (!delegate_.get())
return;
if (error_type != translate::TranslateErrors::NONE)
« no previous file with comments | « ios/web_view/internal/translate/web_view_translate_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698