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

Unified Diff: components/translate/ios/browser/language_detection_controller.mm

Issue 2581883002: [ios] Do not JSON encode messages sent from WebView to native code. (Closed)
Patch Set: Actually addressed review comments :) Created 4 years 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 | « no previous file | ios/web/web_state/js/resources/message.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/ios/browser/language_detection_controller.mm
diff --git a/components/translate/ios/browser/language_detection_controller.mm b/components/translate/ios/browser/language_detection_controller.mm
index ed82a83c1fec8990a395bddb249fff1635282c0f..14c6800494f77d9f4e2e0d2af1762eaa7a2632ad 100644
--- a/components/translate/ios/browser/language_detection_controller.mm
+++ b/components/translate/ios/browser/language_detection_controller.mm
@@ -87,8 +87,8 @@ bool LanguageDetectionController::OnTextCaptured(
return false;
}
- int capture_text_time = 0;
- command.GetInteger("captureTextTime", &capture_text_time);
+ double capture_text_time = 0;
+ command.GetDouble("captureTextTime", &capture_text_time);
UMA_HISTOGRAM_TIMES(kTranslateCaptureText,
base::TimeDelta::FromMillisecondsD(capture_text_time));
std::string html_lang;
« no previous file with comments | « no previous file | ios/web/web_state/js/resources/message.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698