DescriptionUse pipe as ID separator and add inverse functions for MakeUniqueID
A ContentSuggestionsProvider needs to be able to split up the
suggestion_id it retrieves in DiscardSuggestion and FetchSuggestionImage
into the category and the within_category_id that it provided to
MakeUniqueID when creating the ContentSuggestion.
Add two static helper functions to ContentSuggestionsProvider that
do the splitting.
Use the pipe "|" character instead of a colon to separate the category
from the within_category_id to prevent mistakes when implementing a
ContentSuggestionsProvider: Accidentally splitting a URL (which might
already be the within_category_id) instead of the unique_id fails
silently because URLs contain a colon. Using a different separator
prevents this.
BUG=619560
Committed: https://crrev.com/0cde3173b62fee4162a93fe497f8df2597c5e49e
Cr-Commit-Position: refs/heads/master@{#406268}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Marc's comments #Patch Set 3 : Fix category not initialized warning #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 17 (6 generated)
|