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

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

Issue 2767893002: Remove ScopedVector from chrome/browser/. (Closed)
Patch Set: Address comments from zea@ Created 3 years, 9 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/spellcheck_message_filter_unittest.cc
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc b/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc
index 35a367b96fa1b926e2e53b7b03a4189dd8849d5c..83bb639e081e9730d35ec946df90fb2ae2d1dd7e 100644
--- a/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc
@@ -5,9 +5,12 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <tuple>
+#include <vector>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/spellchecker/spellcheck_factory.h"
#include "chrome/browser/spellchecker/spellcheck_message_filter.h"
@@ -26,7 +29,7 @@ class TestingSpellCheckMessageFilter : public SpellCheckMessageFilter {
spellcheck_(new SpellcheckService(&profile_)) {}
bool Send(IPC::Message* message) override {
- sent_messages.push_back(message);
+ sent_messages.push_back(base::WrapUnique(message));
return true;
}
@@ -45,7 +48,7 @@ class TestingSpellCheckMessageFilter : public SpellCheckMessageFilter {
}
#endif
- ScopedVector<IPC::Message> sent_messages;
+ std::vector<std::unique_ptr<IPC::Message>> sent_messages;
private:
~TestingSpellCheckMessageFilter() override {}
@@ -105,7 +108,7 @@ TEST(SpellCheckMessageFilterTest, OnTextCheckCompleteTestCustomDictionary) {
SpellCheckMsg_RespondSpellingService::Param params;
bool ok = SpellCheckMsg_RespondSpellingService::Read(
- filter->sent_messages[0], &params);
+ filter->sent_messages[0].get(), &params);
int sent_identifier = std::get<0>(params);
bool sent_success = std::get<1>(params);
base::string16 sent_text = std::get<2>(params);
@@ -136,7 +139,7 @@ TEST(SpellCheckMessageFilterTest, OnTextCheckCompleteTest) {
SpellCheckMsg_RespondSpellingService::Param params;
bool ok = SpellCheckMsg_RespondSpellingService::Read(
- filter->sent_messages[0], & params);
+ filter->sent_messages[0].get(), &params);
base::string16 sent_text = std::get<2>(params);
std::vector<SpellCheckResult> sent_results = std::get<3>(params);
EXPECT_TRUE(ok);

Powered by Google App Engine
This is Rietveld 408576698