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

Side by Side Diff: chrome/common/translate/translate_helper_metrics.cc

Issue 18911002: Move language detection to chrome/common/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Full test + rebase Created 7 years, 5 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 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698