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

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

Issue 64823005: Copy the implementations of TranslateUIDelegate to TransalteInfobarDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Peter's review (2) Created 7 years, 1 month 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_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_DECLINE_TRANSLATE,
21 UMA_REVERT_TRANSLATION,
Takashi Toyoshima 2013/11/12 22:16:56 DECLINE and PERFORM use _TRANSLATE, but REVER uses
22 UMA_PERFORM_TRANSLATE,
23 UMA_NEVER_TRANSLATE_LANG,
24 UMA_NEVER_TRANSLATE_SITE,
25 UMA_ALWAYS_TRANSLATE_LANG,
26 UMA_MODIFY_ORIGINAL_LANG,
27 UMA_MODIFY_TARGET_LANG,
20 UMA_MAX, 28 UMA_MAX,
21 }; 29 };
22 30
23 // When Chrome Translate is ready to translate a page, one of following reason 31 // When Chrome Translate is ready to translate a page, one of following reason
24 // decide the next browser action. 32 // decide the next browser action.
25 // Note: Don't insert any item. It will change reporting UMA value, and break 33 // Note: Don't insert any item. It will change reporting UMA value, and break
26 // the UMA dashboard page. Insteads, append it at the end of enum as suggested 34 // the UMA dashboard page. Insteads, append it at the end of enum as suggested
27 // below. 35 // below.
28 enum InitiationStatusType { 36 enum InitiationStatusType {
29 INITIATION_STATUS_DISABLED_BY_PREFS, 37 INITIATION_STATUS_DISABLED_BY_PREFS,
(...skipping 25 matching lines...) Expand all
55 void ReportUndisplayableLanguage(const std::string& language); 63 void ReportUndisplayableLanguage(const std::string& language);
56 64
57 void ReportUnsupportedLanguageAtInitiation(const std::string& language); 65 void ReportUnsupportedLanguageAtInitiation(const std::string& language);
58 66
59 // Provides UMA entry names for unit tests. 67 // Provides UMA entry names for unit tests.
60 const char* GetMetricsName(MetricsNameIndex index); 68 const char* GetMetricsName(MetricsNameIndex index);
61 69
62 } // namespace TranslateBrowserMetrics 70 } // namespace TranslateBrowserMetrics
63 71
64 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_ 72 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698