summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 00:06:23 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 00:06:23 +0000
commitb3b4a0c6f16541f5eea81821c2b2f9fb73d6ccf8 (patch)
treeccddcca65a211cbaa50d92f9c96c5e2ec2b90228 /chrome/common
parent483d295ffb20a3eb03e87e75b538b9f1b3d08749 (diff)
downloadchromium_src-b3b4a0c6f16541f5eea81821c2b2f9fb73d6ccf8.zip
chromium_src-b3b4a0c6f16541f5eea81821c2b2f9fb73d6ccf8.tar.gz
chromium_src-b3b4a0c6f16541f5eea81821c2b2f9fb73d6ccf8.tar.bz2
When Chrome translates a page, the translate server might detect that the page is in a different language than the one Chrome detected.
If that language is not in the list of languages that Chrome supports for translation, then we do not know what to show and we were crashing. This CL makes it so that we show an error infobar instead. Note that in the future we should improve the "after translate" infobar to support showing the original language as unknown. (http://crbug.com/9390) BUG=48918 TEST=Not sure how to test without changing the code. Review URL: http://codereview.chromium.org/3011008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/translate_errors.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/common/translate_errors.h b/chrome/common/translate_errors.h
index 56a104c..1c6ea8a 100644
--- a/chrome/common/translate_errors.h
+++ b/chrome/common/translate_errors.h
@@ -14,6 +14,8 @@ class TranslateErrors {
NETWORK, // No connectivity.
INITIALIZATION_ERROR, // The translation script failed to initialize.
UNKNOWN_LANGUAGE, // The page's language could not be detected.
+ UNSUPPORTED_LANGUAGE, // The server detected a language that the browser
+ // does not know.
IDENTICAL_LANGUAGES, // The original and target languages are the same.
TRANSLATION_ERROR, // An error was reported by the translation script
// during translation.