#include "third_party/blink/public/web/web_language_detection_details.h"
#include "base/metrics/histogram_functions.h"
#include "third_party/blink/public/common/metrics/accept_language_and_content_language_usage.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/element_traversal.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/navigator.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/html_meta_element.h"
#include "third_party/blink/renderer/core/xml_names.h"
namespace blink {
namespace {
const AtomicString& DocumentLanguage(const Document& document) { … }
const AtomicString& DocumentXmlLanguage(const Document& document) { … }
bool HasNoTranslate(const Document& document) { … }
String GetLanguageCode(const String& language) { … }
void MatchTargetLanguageWithAcceptLanguages(
const Document& document,
const AtomicString& target_language,
bool is_xml_lang,
const std::string& language_histogram_name) { … }
}
WebLanguageDetectionDetails
WebLanguageDetectionDetails::CollectLanguageDetectionDetails(
const WebDocument& web_document) { … }
void WebLanguageDetectionDetails::RecordAcceptLanguageAndXmlHtmlLangMetric(
const WebDocument& web_document) { … }
}