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

Unified Diff: components/translate/core/common/translate_metrics.cc

Issue 726923004: Cleanup: Use http/https constants in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « components/navigation_metrics/navigation_metrics.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « components/navigation_metrics/navigation_metrics.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698