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

Unified Diff: chrome/renderer/translate/translate_helper.h

Issue 14494004: Added the 'Translation Logs' tab to chrome://translate-internals/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (Rebasing) Created 7 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: chrome/renderer/translate/translate_helper.h
diff --git a/chrome/renderer/translate/translate_helper.h b/chrome/renderer/translate/translate_helper.h
index 0c0245cc7388cde5a17dd46ea35d2c0b67f78461..c03f8829097321800c23c8219f8c38d176c10e99 100644
--- a/chrome/renderer/translate/translate_helper.h
+++ b/chrome/renderer/translate/translate_helper.h
@@ -108,7 +108,9 @@ class TranslateHelper : public content::RenderViewObserver {
// Determine content page language from Content-Language code and contents.
static std::string DeterminePageLanguage(const std::string& code,
- const string16& contents);
+ const string16& contents,
+ std::string* cld_language,
+ bool* is_cld_reliable);
// Returns whether the page associated with |document| is a candidate for
// translation. Some pages can explictly specify (via a meta-tag) that they
@@ -118,7 +120,10 @@ class TranslateHelper : public content::RenderViewObserver {
#if defined(ENABLE_LANGUAGE_DETECTION)
// Returns the ISO 639_1 language code of the specified |text|, or 'unknown'
// if it failed.
- static std::string DetermineTextLanguage(const string16& text);
+ // |is_cld_reliable| will be set as true if CLD says the detection is
+ // reliable.
+ static std::string DetermineTextLanguage(const string16& text,
+ bool* is_cld_reliable);
#endif
// RenderViewObserver implementation.

Powered by Google App Engine
This is Rietveld 408576698