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

Side by Side Diff: chrome/browser/translate/translate_browser_metrics.h

Issue 19857005: Do not show translate bar for MHTML files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up comments. Created 7 years, 4 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 | « no previous file | chrome/browser/translate/translate_browser_metrics_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_ 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace TranslateBrowserMetrics { 10 namespace TranslateBrowserMetrics {
11 11
12 // An indexing type to query each UMA entry name via GetMetricsName() function. 12 // An indexing type to query each UMA entry name via GetMetricsName() function.
13 // Note: |kMetricsEntries| should be updated when a new entry is added here. 13 // Note: |kMetricsEntries| should be updated when a new entry is added here.
14 enum MetricsNameIndex { 14 enum MetricsNameIndex {
15 UMA_INITIATION_STATUS, 15 UMA_INITIATION_STATUS,
16 UMA_LANGUAGE_DETECTION_ERROR, 16 UMA_LANGUAGE_DETECTION_ERROR,
17 UMA_LOCALES_ON_DISABLED_BY_PREFS, 17 UMA_LOCALES_ON_DISABLED_BY_PREFS,
18 UMA_UNDISPLAYABLE_LANGUAGE, 18 UMA_UNDISPLAYABLE_LANGUAGE,
19 UMA_UNSUPPORTED_LANGUAGE_AT_INITIATION, 19 UMA_UNSUPPORTED_LANGUAGE_AT_INITIATION,
20 UMA_MAX, 20 UMA_MAX,
21 }; 21 };
22 22
23 // When Chrome Translate is ready to translate a page, one of following reason 23 // When Chrome Translate is ready to translate a page, one of following reason
24 // decide the next browser action. 24 // decide the next browser action.
25 enum InitiationStatusType { 25 enum InitiationStatusType {
26 INITIATION_STATUS_DISABLED_BY_PREFS, 26 INITIATION_STATUS_DISABLED_BY_PREFS,
27 INITIATION_STATUS_DISABLED_BY_SWITCH, 27 INITIATION_STATUS_DISABLED_BY_SWITCH,
28 INITIATION_STATUS_DISABLED_BY_CONFIG, 28 INITIATION_STATUS_DISABLED_BY_CONFIG,
29 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED, 29 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED,
30 INITIATION_STATUS_MIME_TYPE_IS_NOT_SUPPORTED,
30 INITIATION_STATUS_URL_IS_NOT_SUPPORTED, 31 INITIATION_STATUS_URL_IS_NOT_SUPPORTED,
31 INITIATION_STATUS_SIMILAR_LANGUAGES, 32 INITIATION_STATUS_SIMILAR_LANGUAGES,
32 INITIATION_STATUS_ACCEPT_LANGUAGES, 33 INITIATION_STATUS_ACCEPT_LANGUAGES,
33 34
34 INITIATION_STATUS_AUTO_BY_CONFIG, 35 INITIATION_STATUS_AUTO_BY_CONFIG,
35 INITIATION_STATUS_AUTO_BY_LINK, 36 INITIATION_STATUS_AUTO_BY_LINK,
36 INITIATION_STATUS_SHOW_INFOBAR, 37 INITIATION_STATUS_SHOW_INFOBAR,
37 38
38 INITIATION_STATUS_MAX, 39 INITIATION_STATUS_MAX,
39 }; 40 };
(...skipping 12 matching lines...) Expand all
52 void ReportUndisplayableLanguage(const std::string& language); 53 void ReportUndisplayableLanguage(const std::string& language);
53 54
54 void ReportUnsupportedLanguageAtInitiation(const std::string& language); 55 void ReportUnsupportedLanguageAtInitiation(const std::string& language);
55 56
56 // Provides UMA entry names for unit tests. 57 // Provides UMA entry names for unit tests.
57 const char* GetMetricsName(MetricsNameIndex index); 58 const char* GetMetricsName(MetricsNameIndex index);
58 59
59 } // namespace TranslateBrowserMetrics 60 } // namespace TranslateBrowserMetrics
60 61
61 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_ 62 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/translate/translate_browser_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698