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

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

Issue 2913573002: Updates language model on iOS. (Closed)
Patch Set: Created 3 years, 6 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..f4c39366430b6773d40dd39839afb42a09e6390a 100644
--- a/components/translate/ios/browser/language_detection_controller.h
+++ b/components/translate/ios/browser/language_detection_controller.h
@@ -34,7 +34,14 @@ namespace translate {
class LanguageDetectionController : public web::WebStateObserver {
public:
// Language detection details, passed to language detection callbacks.
+ // TODO(crbug.com/715447): Investigate if we can use the existing
+ // detection_details under
+ // components/translate/core/common/language_detection_details.h.
struct DetectionDetails {
+ DetectionDetails();
+ DetectionDetails(const DetectionDetails& other);
+ ~DetectionDetails();
+
// The language detected by the content (Content-Language).
std::string content_language;
@@ -43,6 +50,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