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

Side by Side Diff: chrome/common/translate/translate_errors.h

Issue 93603006: Move Translate-related files to components/translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/common/translate/language_detection_details.cc ('k') | chrome/renderer/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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_TRANSLATE_ERRORS_H_
6 #define CHROME_COMMON_TRANSLATE_TRANSLATE_ERRORS_H_
7
8 #include "base/basictypes.h"
9
10 // This file consolidates all the error types for translation of a page.
11 // Note: TranslateErrors is used for UMA and translate_internals.js.
12 // Assigned numbers should be changed because the number is binded to UMA value.
13 // enum TranslateError in histograms.xml and errorStrs in translate_internals.js
14 // should be updated when the type is updated.
15
16 class TranslateErrors {
17 public:
18 enum Type {
19 NONE = 0,
20 NETWORK, // No connectivity.
21 INITIALIZATION_ERROR, // The translation script failed to initialize.
22 UNKNOWN_LANGUAGE, // The page's language could not be detected.
23 UNSUPPORTED_LANGUAGE, // The server detected a language that the browser
24 // does not know.
25 IDENTICAL_LANGUAGES, // The original and target languages are the same.
26 TRANSLATION_ERROR, // An error was reported by the translation script
27 // during translation.
28 TRANSLATION_TIMEOUT, // The library doesn't finish the translation.
29 UNEXPECTED_SCRIPT_ERROR, // The library raises an unexpected exception.
30 BAD_ORIGIN, // The library is blocked because of bad origin.
31 SCRIPT_LOAD_ERROR, // Loader fails to load a dependent JavaScript.
32 TRANSLATE_ERROR_MAX,
33 };
34
35 private:
36 TranslateErrors() {}
37
38 DISALLOW_COPY_AND_ASSIGN(TranslateErrors);
39 };
40
41 #endif // CHROME_COMMON_TRANSLATE_TRANSLATE_ERRORS_H_
OLDNEW
« no previous file with comments | « chrome/common/translate/language_detection_details.cc ('k') | chrome/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698