Commit 3f6873e9 authored by olivierrobin's avatar olivierrobin Committed by Commit bot

Fix DCHECK when adding non ASCII bookmark from share extension.

When adding a bookmark with a non ASCII bookmark, a DCHECK was hit when
converting to UTF16.

BUG=675981

Review-Url: https://codereview.chromium.org/2590973002
Cr-Commit-Position: refs/heads/master@{#439827}
parent b1309cfb
...@@ -220,7 +220,7 @@ void LogHistogramReceivedItem(ShareExtensionItemReceived type) { ...@@ -220,7 +220,7 @@ void LogHistogramReceivedItem(ShareExtensionItemReceived type) {
LogHistogramReceivedItem(BOOKMARK_ENTRY); LogHistogramReceivedItem(BOOKMARK_ENTRY);
_bookmarkModel->AddURL( _bookmarkModel->AddURL(
_bookmarkModel->mobile_node(), 0, _bookmarkModel->mobile_node(), 0,
base::ASCIIToUTF16(entryTitle), entryURL); base::UTF8ToUTF16(entryTitle), entryURL);
} }
if (completion) { if (completion) {
web::WebThread::PostTask(web::WebThread::FILE, web::WebThread::PostTask(web::WebThread::FILE,
......
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