blob: 1c6ea8a4004fffc9146d60495504837e34919c01 [file] [log] [blame]
[email protected]152b8ba32010-03-29 19:40:161// 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
10class TranslateErrors {
11 public:
12 enum Type {
13 NONE = 0,
[email protected]85d252e2010-04-06 22:21:0214 NETWORK, // No connectivity.
15 INITIALIZATION_ERROR, // The translation script failed to initialize.
[email protected]579317e2010-06-30 20:13:4816 UNKNOWN_LANGUAGE, // The page's language could not be detected.
[email protected]b3b4a0c62010-07-19 00:06:2317 UNSUPPORTED_LANGUAGE, // The server detected a language that the browser
18 // does not know.
[email protected]579317e2010-06-30 20:13:4819 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]152b8ba32010-03-29 19:40:1622 };
23
24 private:
25 TranslateErrors() {}
26
27 DISALLOW_COPY_AND_ASSIGN(TranslateErrors);
28};
29
30#endif // CHROME_COMMON_TRANSLATE_ERRORS_H_