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

Unified Diff: components/copresence/rpc/rpc_handler_unittest.cc

Issue 613043002: Switching to C++11 range-based for loops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 6 years, 2 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/copresence/rpc/rpc_handler.cc ('k') | components/copresence/timed_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/rpc/rpc_handler_unittest.cc
diff --git a/components/copresence/rpc/rpc_handler_unittest.cc b/components/copresence/rpc/rpc_handler_unittest.cc
index 2bba24440312255b02b0263ebec0c96f451bbc69..4b57a5169810ed318dc26d2cfef45ca0ecbe7cc5 100644
--- a/components/copresence/rpc/rpc_handler_unittest.cc
+++ b/components/copresence/rpc/rpc_handler_unittest.cc
@@ -31,11 +31,8 @@ void CreateSubscribedMessage(const std::vector<std::string>& subscription_ids,
const std::string& message_string,
SubscribedMessage* message_proto) {
message_proto->mutable_published_message()->set_payload(message_string);
- for (std::vector<std::string>::const_iterator subscription_id =
- subscription_ids.begin();
- subscription_id != subscription_ids.end();
- ++subscription_id) {
- message_proto->add_subscription_id(*subscription_id);
+ for (const std::string& subscription_id : subscription_ids) {
+ message_proto->add_subscription_id(subscription_id);
}
}
@@ -214,7 +211,7 @@ TEST_F(RpcHandlerTest, ReportTokens) {
rpc_handler_.ReportTokens(test_tokens);
EXPECT_EQ(RpcHandler::kReportRequestRpcName, rpc_name_);
ReportRequest* report = static_cast<ReportRequest*>(request_proto_.get());
- google::protobuf::RepeatedPtrField<TokenObservation> tokens_sent =
+ RepeatedPtrField<TokenObservation> tokens_sent =
report->update_signals_request().token_observation();
ASSERT_EQ(2, tokens_sent.size());
EXPECT_EQ("token 1", tokens_sent.Get(0).token_id());
« no previous file with comments | « components/copresence/rpc/rpc_handler.cc ('k') | components/copresence/timed_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698