New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 633141 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

ContentSuggestion should use base::string16

Project Member Reported by pke@google.com, Aug 1 2016

Issue description

For 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.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Aug 1 2016

Labels: Hotlist-Google
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Comment 3 by pke@google.com, Aug 1 2016

Owner: pke@google.com
Status: Fixed (was: Available)

Comment 4 Deleted

Sign in to add a comment