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 @@ ...@@ -9,26 +9,31 @@
namespace shared_highlighting { 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 { enum class LinkGenerationError {
kIncorrectSelector, kIncorrectSelector = 0,
kNoRange, kNoRange = 1,
kNoContext, kNoContext = 2,
kContextExhausted, kContextExhausted = 3,
kContextLimitReached, kContextLimitReached = 4,
kEmptySelection, kEmptySelection = 5,
kTabHidden, // Android specific.
kOmniboxNavigation, kTabHidden = 5,
kTabCrash, kOmniboxNavigation = 6,
kTabCrash = 7,
kMaxValue = kTabCrash 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 { enum class TextFragmentLinkOpenSource {
kUnknown, kUnknown = 0,
kSearchEngine, kSearchEngine = 1,
kMaxValue = kSearchEngine, kMaxValue = kSearchEngine,
}; };
......
...@@ -14538,14 +14538,14 @@ should be kept until we remove incident reporting. --> ...@@ -14538,14 +14538,14 @@ should be kept until we remove incident reporting. -->
(e.g. #:=:text=SELECTOR). Indicates source type that navigation originated (e.g. #:=:text=SELECTOR). Indicates source type that navigation originated
from. It only know about search engines that come from the pre-populated 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 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 list, it will be recorded as Unknown. This is even true if the user have a
a custom search engine. These custom search engines can be created by hand custom search engine. These custom search engines can be created by hand or
or auto-generated. In either case, it's not going to count as a search auto-generated. In either case, it's not going to count as a search engine.
engine. Also, it only checks to see if the *referrer* is from a domain Also, it only checks to see if the *referrer* is from a domain associated
associated with search engine. If someone posts a link somewhere on a web with search engine. If someone posts a link somewhere on a web site that
site that happens to have a search engine known to Google and that links happens to have a search engine known to Google and that links includes the
includes the fragment tokens, then if a user clicks that link, it'll look fragment tokens, then if a user clicks that link, it'll look like it came
like it came from a search engine even thought they did not. from a search engine even thought they did not.
</summary> </summary>
</histogram> </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