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

Unified Diff: chrome/browser/spellchecker/feedback.cc

Issue 1665023002: Cheer up spell-checking code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/browser/spellchecker/feedback.cc
diff --git a/chrome/browser/spellchecker/feedback.cc b/chrome/browser/spellchecker/feedback.cc
index 17bc4b7e60b46b9e14e6ea4a13f20c11c2e1aa01..6cac2c1e2b394e2184b9db2863d85f492f2e68a6 100644
--- a/chrome/browser/spellchecker/feedback.cc
+++ b/chrome/browser/spellchecker/feedback.cc
@@ -22,6 +22,7 @@
#include "base/logging.h"
#include "base/stl_util.h"
please use gerrit instead 2016/02/03 23:59:10 No longer need this include.
Kevin Bailey 2016/02/04 16:34:10 Done.
+#include "chrome/browser/spellchecker/set_difference_container.h"
namespace spellcheck {
@@ -49,12 +50,10 @@ void Feedback::FinalizeRemovedMisspellings(
HashCollection& renderer_hashes = renderer_it->second;
HashCollection remaining_hashes(remaining_markers.begin(),
remaining_markers.end());
- std::vector<uint32_t> removed_hashes =
- base::STLSetDifference<std::vector<uint32_t>>(renderer_hashes,
- remaining_hashes);
- for (std::vector<uint32_t>::const_iterator hash_it = removed_hashes.begin();
- hash_it != removed_hashes.end(); ++hash_it) {
- HashMisspellingMap::iterator misspelling_it = misspellings_.find(*hash_it);
+ spellcheck::set_difference_container<HashCollection, HashCollection>
+ removed_hashes(renderer_hashes, remaining_hashes);
+ for (auto hash : removed_hashes) {
+ HashMisspellingMap::iterator misspelling_it = misspellings_.find(hash);
if (misspelling_it != misspellings_.end() &&
!misspelling_it->second.action.IsFinal()) {
misspelling_it->second.action.Finalize();
« no previous file with comments | « no previous file | chrome/browser/spellchecker/feedback_sender.h » ('j') | chrome/browser/spellchecker/feedback_sender.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698