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 "components/translate/common/translate_metrics.h" | 5 #include "components/translate/core/common/translate_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 translate { | 10 namespace translate { |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // Constant string values to indicate UMA names. All entries should have | 14 // Constant string values to indicate UMA names. All entries should have |
15 // a corresponding index in MetricsNameIndex and an entry in |kMetricsEntries|. | 15 // a corresponding index in MetricsNameIndex and an entry in |kMetricsEntries|. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 const char* GetMetricsName(MetricsNameIndex index) { | 121 const char* GetMetricsName(MetricsNameIndex index) { |
122 for (size_t i = 0; i < arraysize(kMetricsEntries); ++i) { | 122 for (size_t i = 0; i < arraysize(kMetricsEntries); ++i) { |
123 if (kMetricsEntries[i].index == index) | 123 if (kMetricsEntries[i].index == index) |
124 return kMetricsEntries[i].name; | 124 return kMetricsEntries[i].name; |
125 } | 125 } |
126 NOTREACHED(); | 126 NOTREACHED(); |
127 return NULL; | 127 return NULL; |
128 } | 128 } |
129 | 129 |
130 } // namespace translate | 130 } // namespace translate |
OLD | NEW |