Index: components/translate/core/common/translate_metrics.cc |
diff --git a/components/translate/core/common/translate_metrics.cc b/components/translate/core/common/translate_metrics.cc |
index f17a11eca00fcc150c4019dbef560db51c017c93..2c64b5295979c24fc3c25bd105b086db4c8a856a 100644 |
--- a/components/translate/core/common/translate_metrics.cc |
+++ b/components/translate/core/common/translate_metrics.cc |
@@ -6,6 +6,7 @@ |
#include "base/basictypes.h" |
#include "base/metrics/histogram.h" |
+#include "url/url_constants.h" |
namespace translate { |
@@ -24,9 +25,6 @@ const char kTranslateUserActionDuration[] = "Translate.UserActionDuration"; |
const char kTranslatePageScheme[] = "Translate.PageScheme"; |
const char kTranslateSimilarLanguageMatch[] = "Translate.SimilarLanguageMatch"; |
-const char kSchemeHttp[] = "http"; |
-const char kSchemeHttps[] = "https"; |
- |
struct MetricsEntry { |
MetricsNameIndex index; |
const char* const name; |
@@ -106,9 +104,9 @@ void ReportUserActionDuration(base::TimeTicks begin, base::TimeTicks end) { |
void ReportPageScheme(const std::string& scheme) { |
SchemeType type = SCHEME_OTHERS; |
- if (scheme == kSchemeHttp) |
+ if (scheme == url::kHttpScheme) |
type = SCHEME_HTTP; |
- else if (scheme == kSchemeHttps) |
+ else if (scheme == url::kHttpsScheme) |
type = SCHEME_HTTPS; |
UMA_HISTOGRAM_ENUMERATION(kTranslatePageScheme, type, SCHEME_MAX); |
} |