• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #pragma once
8 
9 // This file consolidates all the error types for translation of a page.
10 
11 class TranslateErrors {
12  public:
13   enum Type {
14     NONE = 0,
15     NETWORK,  // No connectivity.
16     INITIALIZATION_ERROR,  // The translation script failed to initialize.
17     UNKNOWN_LANGUAGE,      // The page's language could not be detected.
18     UNSUPPORTED_LANGUAGE,  // The server detected a language that the browser
19                            // does not know.
20     IDENTICAL_LANGUAGES,   // The original and target languages are the same.
21     TRANSLATION_ERROR,     // An error was reported by the translation script
22                            // during translation.
23   };
24 
25  private:
TranslateErrors()26   TranslateErrors() {}
27 
28   DISALLOW_COPY_AND_ASSIGN(TranslateErrors);
29 };
30 
31 #endif  // CHROME_COMMON_TRANSLATE_ERRORS_H_
32