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

Unified Diff: components/sync/test/engine/mock_connection_manager.cc

Issue 2656303006: Remove Scopevector in //components/sync/ (Closed)
Patch Set: Created 3 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
« no previous file with comments | « components/sync/test/engine/mock_connection_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/test/engine/mock_connection_manager.cc
diff --git a/components/sync/test/engine/mock_connection_manager.cc b/components/sync/test/engine/mock_connection_manager.cc
index d50e2988591db730c36d22e616583ba0315361f9..79b5b3a05f529f8a92a9a2fa52ace69203e72c7a 100644
--- a/components/sync/test/engine/mock_connection_manager.cc
+++ b/components/sync/test/engine/mock_connection_manager.cc
@@ -7,6 +7,7 @@
#include <map>
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "components/sync/engine_impl/syncer_proto_util.h"
#include "components/sync/protocol/bookmark_specifics.pb.h"
@@ -594,7 +595,7 @@ void MockConnectionManager::ProcessCommit(
map<string, string> changed_ids;
const CommitMessage& commit_message = csm->commit();
CommitResponse* commit_response = response_buffer->mutable_commit();
- commit_messages_.push_back(new CommitMessage);
+ commit_messages_.push_back(base::MakeUnique<CommitMessage>());
commit_messages_.back()->CopyFrom(commit_message);
map<string, sync_pb::CommitResponse_EntryResponse*> response_map;
for (int i = 0; i < commit_message.entries_size(); i++) {
@@ -645,7 +646,8 @@ void MockConnectionManager::ProcessCommit(
er->set_id_string(new_id);
}
}
- commit_responses_.push_back(new CommitResponse(*commit_response));
+ commit_responses_.push_back(
+ base::MakeUnique<CommitResponse>(*commit_response));
if (commit_client_command_) {
response_buffer->mutable_client_command()->CopyFrom(
« no previous file with comments | « components/sync/test/engine/mock_connection_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698