| OLD | NEW |
| 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 #include "chrome/renderer/translate/translate_helper_metrics.h" | 5 #include "chrome/common/translate/translate_helper_metrics.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 // Constant string values to indicate UMA names. All entries should have | 12 // Constant string values to indicate UMA names. All entries should have |
| 13 // a corresponding index in MetricsNameIndex and an entry in |kMetricsEntries|. | 13 // a corresponding index in MetricsNameIndex and an entry in |kMetricsEntries|. |
| 14 const char kRenderer4LanguageDetection[] = "Renderer4.LanguageDetection"; | 14 const char kRenderer4LanguageDetection[] = "Renderer4.LanguageDetection"; |
| 15 const char kTranslateContentLanguage[] = "Translate.ContentLanguage"; | 15 const char kTranslateContentLanguage[] = "Translate.ContentLanguage"; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 const char* GetMetricsName(MetricsNameIndex index) { | 137 const char* GetMetricsName(MetricsNameIndex index) { |
| 138 for (size_t i = 0; i < arraysize(kMetricsEntries); ++i) { | 138 for (size_t i = 0; i < arraysize(kMetricsEntries); ++i) { |
| 139 if (kMetricsEntries[i].index == index) | 139 if (kMetricsEntries[i].index == index) |
| 140 return kMetricsEntries[i].name; | 140 return kMetricsEntries[i].name; |
| 141 } | 141 } |
| 142 NOTREACHED(); | 142 NOTREACHED(); |
| 143 return NULL; | 143 return NULL; |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace TranslateHelperMetrics | 146 } // namespace TranslateHelperMetrics |
| OLD | NEW |