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

Unified Diff: chrome/browser/translate/translate_infobar_delegate.h

Issue 15297006: Translate (Linux): add after infobar UI for server side language detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renaming 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/browser/translate/translate_infobar_delegate.h
diff --git a/chrome/browser/translate/translate_infobar_delegate.h b/chrome/browser/translate/translate_infobar_delegate.h
index b0613eaed019e7b2ba189006ec5c63cad3f267a3..5cecf69218298becfc28c0321c8834387224a0da 100644
--- a/chrome/browser/translate/translate_infobar_delegate.h
+++ b/chrome/browser/translate/translate_infobar_delegate.h
@@ -168,23 +168,20 @@ class TranslateInfoBarDelegate : public InfoBarDelegate {
static string16 GetLanguageDisplayableName(const std::string& language_code);
// Adds the strings that should be displayed in the after translate infobar to
- // |strings|. The text in that infobar is:
+ // |strings|. If |autodetermined_source_language| is false, the text in that
+ // infobar is:
// "The page has been translated from <lang1> to <lang2>."
- // Because <lang1> and <lang2> are displayed in menu buttons, the text is
- // split in 3 chunks. |swap_languages| is set to true if <lang1> and <lang2>
+ // Otherwise:
+ // "The page has been translated to <lang1>."
+ // Because <lang1>, or <lang1> and <lang2> are displayed in menu buttons, the
+ // text is split in 2 or 3 chunks. |swap_languages| is set to true if
+ // |autodetermined_source_language| is false, and <lang1> and <lang2>
// should be inverted (some languages express the sentense as "The page has
- // been translate to <lang2> from <lang1>.").
+ // been translate to <lang2> from <lang1>."). It is ignored if
+ // |autodetermined_source_language| is true.
static void GetAfterTranslateStrings(std::vector<string16>* strings,
- bool* swap_languages);
-
- // Adds the strings that should be displayed in the after translate infobar to
- // |strings|. When a source language is not determined by Chrome, Languages
- // are detected by a server automatically. And infobar doesn't show source
- // languages. The text in the infobar is:
- // "The page has been translated to <lang1>."
- // Because <lang1> is displayed in a menu button, the text is split in 2
- // chunks.
- static void GetAfterTranslateWithAutoStrings(std::vector<string16>* strings);
+ bool* swap_languages,
+ bool autodetermined_source_language);
protected:
// For testing.

Powered by Google App Engine
This is Rietveld 408576698