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

Unified Diff: components/spellcheck/renderer/spellcheck.cc

Issue 2651503003: Use explicit WebString conversions in spellcheck (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/spellcheck/renderer/spellcheck_multilingual_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/spellcheck/renderer/spellcheck.cc
diff --git a/components/spellcheck/renderer/spellcheck.cc b/components/spellcheck/renderer/spellcheck.cc
index 11fdc6762017271df95f1ce57c53ba8f3c8fc05e..5ff06a25adfad656be0f3c5164f03baf3c97cdcd 100644
--- a/components/spellcheck/renderer/spellcheck.cc
+++ b/components/spellcheck/renderer/spellcheck.cc
@@ -399,12 +399,9 @@ bool SpellCheck::SpellCheckParagraph(
if (!custom_dictionary_.SpellCheckWord(
text, misspelling_start, misspelling_length)) {
- base::string16 replacement;
- textcheck_results.push_back(WebTextCheckingResult(
- blink::WebTextDecorationTypeSpelling,
- misspelling_start,
- misspelling_length,
- replacement));
+ textcheck_results.push_back(
+ WebTextCheckingResult(blink::WebTextDecorationTypeSpelling,
+ misspelling_start, misspelling_length));
kinuko 2017/01/23 04:37:49 If we omit replacement parameter the ctor will use
}
position_in_text = misspelling_start + misspelling_length;
}
@@ -531,7 +528,7 @@ void SpellCheck::CreateTextCheckingResults(
results.push_back(WebTextCheckingResult(
static_cast<WebTextDecorationType>(decoration),
line_offset + spellcheck_result.location, spellcheck_result.length,
- replacement, spellcheck_result.hash));
+ blink::WebString::fromUTF16(replacement), spellcheck_result.hash));
}
textcheck_results->assign(results);
« no previous file with comments | « no previous file | components/spellcheck/renderer/spellcheck_multilingual_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698