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

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

Issue 15311006: Added and replaced some UMAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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_MANAGER_METRICS_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_
7 7
8 #include <string>
9
8 namespace TranslateManagerMetrics { 10 namespace TranslateManagerMetrics {
9 11
10 // 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.
11 // 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.
12 enum MetricsNameIndex { 14 enum MetricsNameIndex {
13 UMA_INITIATION_STATUS, 15 UMA_INITIATION_STATUS,
14 UMA_LANGUAGE_DETECTION_ERROR, 16 UMA_LANGUAGE_DETECTION_ERROR,
15 UMA_SERVER_REPORTED_UNSUPPORTED_LANGUAGE, 17 UMA_SERVER_REPORTED_UNSUPPORTED_LANGUAGE, // obsolete
Takashi Toyoshima 2013/05/21 11:11:43 Remove obsoleted enum ID. It's ok to reuse the sam
hajimehoshi 2013/05/22 04:19:27 Done.
18 UMA_UNAVAILABLE_LANGUAGE,
19 UMA_UNSUPPORTED_LANGUAGE_AT_INITIATION,
16 UMA_MAX, 20 UMA_MAX,
17 }; 21 };
18 22
19 // 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
20 // decide the next browser action. 24 // decide the next browser action.
21 enum InitiationStatusType { 25 enum InitiationStatusType {
22 INITIATION_STATUS_DISABLED_BY_PREFS, 26 INITIATION_STATUS_DISABLED_BY_PREFS,
23 INITIATION_STATUS_DISABLED_BY_SWITCH, 27 INITIATION_STATUS_DISABLED_BY_SWITCH,
24 INITIATION_STATUS_DISABLED_BY_CONFIG, 28 INITIATION_STATUS_DISABLED_BY_CONFIG,
25 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED, 29 INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED,
26 INITIATION_STATUS_URL_IS_NOT_SUPPORTED, 30 INITIATION_STATUS_URL_IS_NOT_SUPPORTED,
27 INITIATION_STATUS_SIMILAR_LANGUAGES, 31 INITIATION_STATUS_SIMILAR_LANGUAGES,
28 INITIATION_STATUS_ACCEPT_LANGUAGES, 32 INITIATION_STATUS_ACCEPT_LANGUAGES,
29 33
30 INITIATION_STATUS_AUTO_BY_CONFIG, 34 INITIATION_STATUS_AUTO_BY_CONFIG,
31 INITIATION_STATUS_AUTO_BY_LINK, 35 INITIATION_STATUS_AUTO_BY_LINK,
32 INITIATION_STATUS_SHOW_INFOBAR, 36 INITIATION_STATUS_SHOW_INFOBAR,
33 37
34 INITIATION_STATUS_MAX, 38 INITIATION_STATUS_MAX,
35 }; 39 };
36 40
37 // Called when Chrome Translate is initiated to report a reason of the next 41 // Called when Chrome Translate is initiated to report a reason of the next
38 // browser action. 42 // browser action.
39 void ReportInitiationStatus(InitiationStatusType type); 43 void ReportInitiationStatus(InitiationStatusType type);
40 44
41 // Called when Chrome opens the URL so that the user sends an error feedback. 45 // Called when Chrome opens the URL so that the user sends an error feedback.
42 void ReportLanguageDetectionError(); 46 void ReportLanguageDetectionError();
43 47
44 // Called when it turns out that translating page is in unsupported language. 48 // Called when it turns out that translating page is in unsupported language.
45 void ReportUnsupportedLanguage(); 49 // |language| is a language code of ISO 639.
50 void ReportUnavailableLanguage(const std::string& language);
51
52 void ReportUnsupportedLanguageAtInitiation(const std::string& language);
46 53
47 // Provides UMA entry names for unit tests. 54 // Provides UMA entry names for unit tests.
48 const char* GetMetricsName(MetricsNameIndex index); 55 const char* GetMetricsName(MetricsNameIndex index);
49 56
50 } // namespace TranslateManagerMetrics 57 } // namespace TranslateManagerMetrics
51 58
52 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_ 59 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698