Index: ios/web_view/shell/translate_controller.m |
diff --git a/ios/web_view/shell/translate_controller.mm b/ios/web_view/shell/translate_controller.m |
similarity index 83% |
rename from ios/web_view/shell/translate_controller.mm |
rename to ios/web_view/shell/translate_controller.m |
index 98bc51bce606b0d846414ace6b139504f2d090ca..f271f5f4ae2c31217d88fef625192fd95f79fa3b 100644 |
--- a/ios/web_view/shell/translate_controller.mm |
+++ b/ios/web_view/shell/translate_controller.m |
@@ -6,7 +6,6 @@ |
#import <UIKit/UIKit.h> |
-#include "base/logging.h" |
#import "ios/web_view/public/criwv_translate_manager.h" |
#if !defined(__has_feature) || !__has_feature(objc_arc) |
@@ -15,9 +14,9 @@ |
@interface TranslateController () |
// Action Sheet to prompt user whether or not the page should be translated. |
-@property (nonatomic, strong) UIAlertController* beforeTranslateActionSheet; |
+@property(nonatomic, strong) UIAlertController* beforeTranslateActionSheet; |
// Manager which performs the translation of the content. |
-@property (nonatomic, strong) id<CRIWVTranslateManager> translateManager; |
+@property(nonatomic, strong) id<CRIWVTranslateManager> translateManager; |
@end |
@implementation TranslateController |
@@ -35,8 +34,6 @@ |
- (void)translateStepChanged:(CRIWVTransateStep)step |
manager:(id<CRIWVTranslateManager>)manager { |
if (step == CRIWVTransateStepBeforeTranslate) { |
- DCHECK(!_translateManager); |
- DCHECK(!_beforeTranslateActionSheet); |
self.translateManager = manager; |
self.beforeTranslateActionSheet = [UIAlertController |
alertControllerWithTitle:nil |
@@ -46,9 +43,7 @@ |
[UIAlertAction actionWithTitle:@"Nope." |
style:UIAlertActionStyleCancel |
handler:^(UIAlertAction* action) { |
- DCHECK(_beforeTranslateActionSheet); |
self.beforeTranslateActionSheet = nil; |
- DCHECK(_translateManager); |
self.translateManager = nil; |
}]; |
[_beforeTranslateActionSheet addAction:cancelAction]; |
@@ -57,9 +52,7 @@ |
[UIAlertAction actionWithTitle:@"Yes!" |
style:UIAlertActionStyleDefault |
handler:^(UIAlertAction* action) { |
- DCHECK(_beforeTranslateActionSheet); |
self.beforeTranslateActionSheet = nil; |
- DCHECK(_translateManager); |
[_translateManager translate]; |
self.translateManager = nil; |
}]; |