[email protected] | 152b8ba3 | 2010-03-29 19:40:16 | [diff] [blame] | 1 | // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_COMMON_TRANSLATE_ERRORS_H_ |
| 6 | #define CHROME_COMMON_TRANSLATE_ERRORS_H_ |
| 7 | |
| 8 | // This file consolidates all the error types for translation of a page. |
| 9 | |
| 10 | class TranslateErrors { |
| 11 | public: |
| 12 | enum Type { |
| 13 | NONE = 0, |
[email protected] | 85d252e | 2010-04-06 22:21:02 | [diff] [blame] | 14 | NETWORK, // No connectivity. |
| 15 | INITIALIZATION_ERROR, // The translation script failed to initialize. |
[email protected] | 579317e | 2010-06-30 20:13:48 | [diff] [blame] | 16 | UNKNOWN_LANGUAGE, // The page's language could not be detected. |
[email protected] | b3b4a0c6 | 2010-07-19 00:06:23 | [diff] [blame] | 17 | UNSUPPORTED_LANGUAGE, // The server detected a language that the browser |
| 18 | // does not know. |
[email protected] | 579317e | 2010-06-30 20:13:48 | [diff] [blame] | 19 | IDENTICAL_LANGUAGES, // The original and target languages are the same. |
| 20 | TRANSLATION_ERROR, // An error was reported by the translation script |
| 21 | // during translation. |
[email protected] | 152b8ba3 | 2010-03-29 19:40:16 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | private: |
| 25 | TranslateErrors() {} |
| 26 | |
| 27 | DISALLOW_COPY_AND_ASSIGN(TranslateErrors); |
| 28 | }; |
| 29 | |
| 30 | #endif // CHROME_COMMON_TRANSLATE_ERRORS_H_ |