Chromium Code Reviews| 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(); |