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

Issue 2155243003: Use pipe as ID separator and add inverse functions for MakeUniqueID (Closed)

Created:
4 years, 5 months ago by Philipp Keck
Modified:
4 years, 5 months ago
Reviewers:
Marc Treib
CC:
chromium-reviews, ntp-dev+reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@css-unittest
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -1 line) Patch
M components/ntp_snippets/content_suggestions_provider.h View 1 chunk +5 lines, -0 lines 0 comments Download
M components/ntp_snippets/content_suggestions_provider.cc View 1 2 3 chunks +27 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 17 (6 generated)
Philipp Keck
PTAL
4 years, 5 months ago (2016-07-19 12:20:28 UTC) #2
Marc Treib
LGTM with two nits, thanks! https://codereview.chromium.org/2155243003/diff/1/components/ntp_snippets/content_suggestions_provider.cc File components/ntp_snippets/content_suggestions_provider.cc (right): https://codereview.chromium.org/2155243003/diff/1/components/ntp_snippets/content_suggestions_provider.cc#newcode15 components/ntp_snippets/content_suggestions_provider.cc:15: const char kSeparator[] = ...
4 years, 5 months ago (2016-07-19 12:31:11 UTC) #3
Philipp Keck
https://codereview.chromium.org/2155243003/diff/1/components/ntp_snippets/content_suggestions_provider.cc File components/ntp_snippets/content_suggestions_provider.cc (right): https://codereview.chromium.org/2155243003/diff/1/components/ntp_snippets/content_suggestions_provider.cc#newcode15 components/ntp_snippets/content_suggestions_provider.cc:15: const char kSeparator[] = "|"; On 2016/07/19 12:31:11, Marc ...
4 years, 5 months ago (2016-07-19 13:02:38 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2155243003/20001
4 years, 5 months ago (2016-07-19 13:03:16 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/37792)
4 years, 5 months ago (2016-07-19 13:14:26 UTC) #9
Philipp Keck
PTAL again
4 years, 5 months ago (2016-07-19 13:21:59 UTC) #10
Marc Treib
On 2016/07/19 13:21:59, Philipp Keck wrote: > PTAL again Still LGTM :)
4 years, 5 months ago (2016-07-19 13:40:56 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2155243003/40001
4 years, 5 months ago (2016-07-19 13:41:44 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-19 14:24:12 UTC) #14
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 14:24:20 UTC) #15
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 14:25:26 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0cde3173b62fee4162a93fe497f8df2597c5e49e
Cr-Commit-Position: refs/heads/master@{#406268}

Powered by Google App Engine
This is Rietveld 408576698