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

Unified Diff: chrome/browser/translate/translate_browser_metrics.h

Issue 131203002: Move LanguageUsageMetrics and TranslateBrowserMetrics to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/translate/translate_browser_metrics.h
diff --git a/chrome/browser/translate/translate_browser_metrics.h b/chrome/browser/translate/translate_browser_metrics.h
deleted file mode 100644
index 21ee89d105a7ec2df8cbaa7fa1b8be8649a97c1e..0000000000000000000000000000000000000000
--- a/chrome/browser/translate/translate_browser_metrics.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_
-#define CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_
-
-#include <string>
-
-namespace TranslateBrowserMetrics {
-
-// An indexing type to query each UMA entry name via GetMetricsName() function.
-// Note: |kMetricsEntries| should be updated when a new entry is added here.
-enum MetricsNameIndex {
- UMA_INITIATION_STATUS,
- UMA_LANGUAGE_DETECTION_ERROR,
- UMA_LOCALES_ON_DISABLED_BY_PREFS,
- UMA_UNDISPLAYABLE_LANGUAGE,
- UMA_UNSUPPORTED_LANGUAGE_AT_INITIATION,
- UMA_MAX,
-};
-
-// When Chrome Translate is ready to translate a page, one of following reason
-// decide the next browser action.
-// Note: Don't insert any item. It will change reporting UMA value, and break
-// the UMA dashboard page. Insteads, append it at the end of enum as suggested
-// below.
-enum InitiationStatusType {
- INITIATION_STATUS_DISABLED_BY_PREFS,
- INITIATION_STATUS_DISABLED_BY_SWITCH,
- INITIATION_STATUS_DISABLED_BY_CONFIG,
- INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED,
- INITIATION_STATUS_URL_IS_NOT_SUPPORTED,
- INITIATION_STATUS_SIMILAR_LANGUAGES,
- INITIATION_STATUS_ACCEPT_LANGUAGES,
- INITIATION_STATUS_AUTO_BY_CONFIG,
- INITIATION_STATUS_AUTO_BY_LINK,
- INITIATION_STATUS_SHOW_INFOBAR,
- INITIATION_STATUS_MIME_TYPE_IS_NOT_SUPPORTED,
- // Insert new items here.
- INITIATION_STATUS_MAX,
-};
-
-// Called when Chrome Translate is initiated to report a reason of the next
-// browser action.
-void ReportInitiationStatus(InitiationStatusType type);
-
-// Called when Chrome opens the URL so that the user sends an error feedback.
-void ReportLanguageDetectionError();
-
-void ReportLocalesOnDisabledByPrefs(const std::string& locale);
-
-// Called when Chrome Translate server sends the language list which includes
-// a undisplayable language in the user's locale.
-void ReportUndisplayableLanguage(const std::string& language);
-
-void ReportUnsupportedLanguageAtInitiation(const std::string& language);
-
-// Provides UMA entry names for unit tests.
-const char* GetMetricsName(MetricsNameIndex index);
-
-} // namespace TranslateBrowserMetrics
-
-#endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_METRICS_H_
« no previous file with comments | « chrome/browser/language_usage_metrics_unittest.cc ('k') | chrome/browser/translate/translate_browser_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698