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

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

Issue 2913573002: Updates language model on iOS. (Closed)
Patch Set: Created 3 years, 7 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: components/translate/ios/browser/language_detection_controller.h
diff --git a/components/translate/ios/browser/language_detection_controller.h b/components/translate/ios/browser/language_detection_controller.h
index c3271e829dcb331e39206b28f2940916aa46a298..a016bbf91a131b807f20d94ba1794d2424d932b9 100644
--- a/components/translate/ios/browser/language_detection_controller.h
+++ b/components/translate/ios/browser/language_detection_controller.h
@@ -35,6 +35,10 @@ class LanguageDetectionController : public web::WebStateObserver {
public:
// Language detection details, passed to language detection callbacks.
struct DetectionDetails {
martis 2017/06/01 06:49:21 Did you investigate reusing LanguageDetectionDetai
ramyasharma 2017/06/02 07:20:24 Yes, I did some basic investigation, and it looked
+ DetectionDetails();
+ DetectionDetails(const DetectionDetails& other);
+ ~DetectionDetails();
+
// The language detected by the content (Content-Language).
std::string content_language;
@@ -43,6 +47,12 @@ class LanguageDetectionController : public web::WebStateObserver {
// The adopted language.
std::string adopted_language;
+
+ // The language detected by CLD.
+ std::string cld_language;
+
+ // Whether the CLD detection is reliable or not.
+ bool is_cld_reliable;
};
LanguageDetectionController(web::WebState* web_state,

Powered by Google App Engine
This is Rietveld 408576698