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

Unified Diff: components/navigation_metrics/navigation_metrics.cc

Issue 2960223002: Add missing schemes to RecordMainFrameNavigation (Closed)
Patch Set: Fix build.gn and DEPS Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/navigation_metrics/DEPS ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/navigation_metrics/navigation_metrics.cc
diff --git a/components/navigation_metrics/navigation_metrics.cc b/components/navigation_metrics/navigation_metrics.cc
index 78df32462d84c6b20fdd45000e4f77c56bea629d..f63b6c4244b92280b66bbd01478daf8347947535 100644
--- a/components/navigation_metrics/navigation_metrics.cc
+++ b/components/navigation_metrics/navigation_metrics.cc
@@ -6,24 +6,33 @@
#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
+#include "components/dom_distiller/core/url_constants.h"
#include "url/gurl.h"
namespace {
-// This enum is used in building the histogram. So, this is append only,
-// any new scheme should be added at the end, before SCHEME_MAX
+// These values are written to logs. New enum values can be added, but existing
+// enums must never be renumbered or deleted and reused. Any new scheme should
+// be added at the end, before SCHEME_MAX.
enum Scheme {
- SCHEME_UNKNOWN,
- SCHEME_HTTP,
- SCHEME_HTTPS,
- SCHEME_FILE,
- SCHEME_FTP,
- SCHEME_DATA,
- SCHEME_JAVASCRIPT,
- SCHEME_ABOUT,
- SCHEME_CHROME,
- SCHEME_BLOB,
- SCHEME_FILESYSTEM,
+ SCHEME_UNKNOWN = 0,
+ SCHEME_HTTP = 1,
+ SCHEME_HTTPS = 2,
+ SCHEME_FILE = 3,
+ SCHEME_FTP = 4,
+ SCHEME_DATA = 5,
+ SCHEME_JAVASCRIPT = 6,
+ SCHEME_ABOUT = 7,
+ SCHEME_CHROME = 8,
+ SCHEME_BLOB = 9,
+ SCHEME_FILESYSTEM = 10,
+ SCHEME_CHROME_NATIVE = 11,
+ SCHEME_CHROME_SEARCH = 12,
+ SCHEME_CHROME_DISTILLER = 13,
+ SCHEME_CHROME_DEVTOOLS = 14,
+ SCHEME_CHROME_EXTENSION = 15,
+ SCHEME_VIEW_SOURCE = 16,
+ SCHEME_EXTERNALFILE = 17,
SCHEME_MAX,
};
@@ -39,11 +48,17 @@ const char* const kSchemeNames[] = {
"chrome",
url::kBlobScheme,
url::kFileSystemScheme,
- "max",
+ "chrome-native",
+ "chrome-search",
+ dom_distiller::kDomDistillerScheme,
+ "chrome-devtools",
+ "chrome-extension",
+ "view-source",
+ "externalfile",
};
-static_assert(arraysize(kSchemeNames) == SCHEME_MAX + 1,
- "kSchemeNames should have SCHEME_MAX + 1 elements");
+static_assert(arraysize(kSchemeNames) == SCHEME_MAX,
+ "kSchemeNames should have SCHEME_MAX elements");
} // namespace
« no previous file with comments | « components/navigation_metrics/DEPS ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698