ContentSuggestion should use base::string16 |
||
Issue descriptionFor fields displayed to the user (title, snippet text, publisher name), the ContentSuggestion should use UTF-16 (base::string16) instead of UTF-8 (std::string), as that's also the data type delivered by many local data sources like the bookmarks provider. Because JSON and therefore the NTPSnippetsService (articles provider) does not support UTF-16, the NTPSnippet should continue to use std::string and then convert the strings where the instances are converted to ContentSuggestions.
,
Aug 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fec302508285401ac5a98f8d9391b22e833ad52f commit fec302508285401ac5a98f8d9391b22e833ad52f Author: pke <pke@google.com> Date: Mon Aug 01 15:54:29 2016 Use base::string16 for user-visible texts in ContentSuggestion Because some providers (like the bookmarks provider) have their strings available in UTF-16 encoding, we should use these throughout. The NTPSnippetsService needs to continue using std::string because the JSON format does not support UTF-16. BUG= 633141 Review-Url: https://codereview.chromium.org/2197223002 Cr-Commit-Position: refs/heads/master@{#408971} [modify] https://crrev.com/fec302508285401ac5a98f8d9391b22e833ad52f/chrome/browser/android/ntp/ntp_snippets_bridge.cc [modify] https://crrev.com/fec302508285401ac5a98f8d9391b22e833ad52f/components/ntp_snippets/content_suggestion.h [modify] https://crrev.com/fec302508285401ac5a98f8d9391b22e833ad52f/components/ntp_snippets/ntp_snippets_service.cc [modify] https://crrev.com/fec302508285401ac5a98f8d9391b22e833ad52f/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
,
Aug 1 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by sheriffbot@chromium.org
, Aug 1 2016