Commit 3893bd52 authored by Sébastien Séguin-Gagnon's avatar Sébastien Séguin-Gagnon Committed by Commit Bot

[SH] Update shared_highlighting histogram enums to fit guidelines.

Added explicit values to enum entries and added a comment mentioning to
not change or re-use those values.

Also made histogram definition clearer.

Change-Id: Idada23970bd834575d314bcfac941f5a3b0e255c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480582
Auto-Submit: sebsg <sebsg@chromium.org>
Commit-Queue: Mark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818019}
parent 2fb6857f
......@@ -9,26 +9,31 @@
namespace shared_highlighting {
// Update corresponding |LinkGenerationError| in enums.xml.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// The type of errors that can happen during link generation.
enum class LinkGenerationError {
kIncorrectSelector,
kNoRange,
kNoContext,
kContextExhausted,
kContextLimitReached,
kEmptySelection,
kTabHidden,
kOmniboxNavigation,
kTabCrash,
kIncorrectSelector = 0,
kNoRange = 1,
kNoContext = 2,
kContextExhausted = 3,
kContextLimitReached = 4,
kEmptySelection = 5,
// Android specific.
kTabHidden = 5,
kOmniboxNavigation = 6,
kTabCrash = 7,
kMaxValue = kTabCrash
};
// Update corresponding |TextFragmentLinkOpenSource| in enums.xml.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// The different sources from which a text fragment URL can come from.
enum class TextFragmentLinkOpenSource {
kUnknown,
kSearchEngine,
kUnknown = 0,
kSearchEngine = 1,
kMaxValue = kSearchEngine,
};
......
......@@ -14538,14 +14538,14 @@ should be kept until we remove incident reporting. -->
(e.g. #:=:text=SELECTOR). Indicates source type that navigation originated
from. It only know about search engines that come from the pre-populated
list installed with Chrome. If the user uses a search engine not on the
list, it won't count as a search engine. This is even true if the user have
a custom search engine. These custom search engines can be created by hand
or auto-generated. In either case, it's not going to count as a search
engine. Also, it only checks to see if the *referrer* is from a domain
associated with search engine. If someone posts a link somewhere on a web
site that happens to have a search engine known to Google and that links
includes the fragment tokens, then if a user clicks that link, it'll look
like it came from a search engine even thought they did not.
list, it will be recorded as Unknown. This is even true if the user have a
custom search engine. These custom search engines can be created by hand or
auto-generated. In either case, it's not going to count as a search engine.
Also, it only checks to see if the *referrer* is from a domain associated
with search engine. If someone posts a link somewhere on a web site that
happens to have a search engine known to Google and that links includes the
fragment tokens, then if a user clicks that link, it'll look like it came
from a search engine even thought they did not.
</summary>
</histogram>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment