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

Unified Diff: chrome/browser/apps/app_shim/app_shim_host_mac_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
« no previous file with comments | « chrome/browser/android/tab_state.cc ('k') | chrome/browser/apps/drive/drive_app_converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc
diff --git a/chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc b/chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc
index 67819733afeff44e7f903c19cbaf0b707adf7f5f..f58b3bcd5511d5f504d693fc71319a282671e567 100644
--- a/chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc
+++ b/chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc
@@ -4,11 +4,12 @@
#include "chrome/browser/apps/app_shim/app_shim_host_mac.h"
+#include <memory>
#include <tuple>
#include <vector>
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/ptr_util.h"
#include "chrome/common/mac/app_shim_messages.h"
#include "ipc/ipc_message.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,15 +23,15 @@ class TestingAppShimHost : public AppShimHost {
bool ReceiveMessage(IPC::Message* message);
- const std::vector<IPC::Message*>& sent_messages() {
- return sent_messages_.get();
+ const std::vector<std::unique_ptr<IPC::Message>>& sent_messages() {
+ return sent_messages_;
}
protected:
bool Send(IPC::Message* message) override;
private:
- ScopedVector<IPC::Message> sent_messages_;
+ std::vector<std::unique_ptr<IPC::Message>> sent_messages_;
DISALLOW_COPY_AND_ASSIGN(TestingAppShimHost);
};
@@ -42,7 +43,7 @@ bool TestingAppShimHost::ReceiveMessage(IPC::Message* message) {
}
bool TestingAppShimHost::Send(IPC::Message* message) {
- sent_messages_.push_back(message);
+ sent_messages_.push_back(base::WrapUnique(message));
return true;
}
@@ -71,7 +72,7 @@ class AppShimHostTest : public testing::Test,
apps::AppShimLaunchResult GetLaunchResult() {
EXPECT_EQ(1u, host()->sent_messages().size());
- IPC::Message* message = host()->sent_messages()[0];
+ IPC::Message* message = host()->sent_messages()[0].get();
EXPECT_EQ(AppShimMsg_LaunchApp_Done::ID, message->type());
AppShimMsg_LaunchApp_Done::Param param;
AppShimMsg_LaunchApp_Done::Read(message, &param);
« no previous file with comments | « chrome/browser/android/tab_state.cc ('k') | chrome/browser/apps/drive/drive_app_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698