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

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

Issue 2762023003: Enable ARC for //ios/web_view/internal/translate/*.m. (Closed)
Patch Set: 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
Index: ios/web_view/internal/translate/web_view_translate_client.h
diff --git a/ios/web_view/internal/translate/web_view_translate_client.h b/ios/web_view/internal/translate/web_view_translate_client.h
index ea806960bc5fc5631f7f33cd5911b0a93b53bd5a..8edb8cdc81853887f5420d8914ffab114026154d 100644
--- a/ios/web_view/internal/translate/web_view_translate_client.h
+++ b/ios/web_view/internal/translate/web_view_translate_client.h
@@ -37,7 +37,7 @@ class WebViewTranslateClient
public:
// Sets the delegate passed by the embedder.
// |delegate| is assumed to outlive this WebViewTranslateClient.
- void set_translate_delegate(id<CWVTranslateDelegate> delegate) {
+ void set_translate_delegate(__weak id<CWVTranslateDelegate> delegate) {
delegate_ = delegate;
}
@@ -72,7 +72,7 @@ class WebViewTranslateClient
translate::IOSTranslateDriver translate_driver_;
// Delegate provided by the embedder.
- id<CWVTranslateDelegate> delegate_; // Weak.
+ __weak id<CWVTranslateDelegate> delegate_;
michaeldo 2017/03/21 16:29:18 Please use base::WeakNSProtocol<id<CWVTranslateDel
Hiroshi Ichikawa 2017/03/22 01:32:15 Done. Just curious, what is advantage of using Wea
michaeldo 2017/03/22 02:13:46 Good question, I don't have all the details, but i
DISALLOW_COPY_AND_ASSIGN(WebViewTranslateClient);
};

Powered by Google App Engine
This is Rietveld 408576698