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

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

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
Index: components/sync/test/engine/mock_connection_manager.h
diff --git a/components/sync/test/engine/mock_connection_manager.h b/components/sync/test/engine/mock_connection_manager.h
index 46fc150cd7e3e1792e39c0e3071da3b9cc97eac5..6af40a6fac6aaff8c36cfacedc9af1d3493ad067 100644
--- a/components/sync/test/engine/mock_connection_manager.h
+++ b/components/sync/test/engine/mock_connection_manager.h
@@ -16,7 +16,6 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
#include "base/synchronization/lock.h"
#include "components/sync/base/model_type.h"
#include "components/sync/base/unique_position.h"
@@ -187,11 +186,13 @@ class MockConnectionManager : public ServerConnectionManager {
const std::vector<syncable::Id>& committed_ids() const {
return committed_ids_;
}
- const std::vector<sync_pb::CommitMessage*>& commit_messages() const {
- return commit_messages_.get();
+ const std::vector<std::unique_ptr<sync_pb::CommitMessage>>& commit_messages()
+ const {
+ return commit_messages_;
}
- const std::vector<sync_pb::CommitResponse*>& commit_responses() const {
- return commit_responses_.get();
+ const std::vector<std::unique_ptr<sync_pb::CommitResponse>>&
+ commit_responses() const {
+ return commit_responses_;
}
// Retrieve the last sent commit message.
const sync_pb::CommitMessage& last_sent_commit() const;
@@ -346,8 +347,8 @@ class MockConnectionManager : public ServerConnectionManager {
int conflict_n_commits_;
// Commit messages we've sent, and responses we've returned.
- ScopedVector<sync_pb::CommitMessage> commit_messages_;
- ScopedVector<sync_pb::CommitResponse> commit_responses_;
+ std::vector<std::unique_ptr<sync_pb::CommitMessage>> commit_messages_;
+ std::vector<std::unique_ptr<sync_pb::CommitResponse>> commit_responses_;
// The next id the mock will return to a commit.
int next_new_id_;
« no previous file with comments | « components/sync/engine_impl/cycle/data_type_tracker.cc ('k') | components/sync/test/engine/mock_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698