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

Unified Diff: chrome/browser/renderer_context_menu/spelling_menu_observer.cc

Issue 2906243002: Revert of Allow storing multiple replacements on SpellCheckResult (Closed)
Patch Set: Revert "Allow storing multiple replacements on SpellCheckResult" Created 3 years, 7 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 | chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_context_menu/spelling_menu_observer.cc
diff --git a/chrome/browser/renderer_context_menu/spelling_menu_observer.cc b/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
index 61de0fd269bdfacb749e67f4f96d2eddd8a5b891..355d84d5ce14b8fdd94c155452a86bbbabea9ca1 100644
--- a/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
+++ b/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
@@ -315,9 +315,7 @@ void SpellingMenuObserver::OnTextCheckComplete(
typedef std::vector<SpellCheckResult> SpellCheckResults;
for (SpellCheckResults::const_iterator it = results.begin();
it != results.end(); ++it) {
- // If there's more than one replacement, we can't automatically apply it
- if (it->replacements.size() == 1)
- result_.replace(it->location, it->length, it->replacements[0]);
+ result_.replace(it->location, it->length, it->replacement);
}
base::string16 result = base::i18n::ToLower(result_);
for (std::vector<base::string16>::const_iterator it = suggestions_.begin();
« no previous file with comments | « no previous file | chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698