Index: sync/test/fake_server/fake_server_verifier.cc |
diff --git a/sync/test/fake_server/fake_server_verifier.cc b/sync/test/fake_server/fake_server_verifier.cc |
index 614f42612c818770177814d28edc23f2a501cf10..20b71926cbc9db0c58c03418bdea9f4911427b03 100644 |
--- a/sync/test/fake_server/fake_server_verifier.cc |
+++ b/sync/test/fake_server/fake_server_verifier.cc |
@@ -110,12 +110,10 @@ AssertionResult FakeServerVerifier::VerifyEntityCountByTypeAndName( |
base::ListValue* entity_list = NULL; |
size_t actual_count = 0; |
if (entities->GetList(model_type_string, &entity_list)) { |
- std::unique_ptr<base::Value> name_value(new base::StringValue(name)); |
- for (base::ListValue::const_iterator it = entity_list->begin(); |
- it != entity_list->end(); ++it) { |
- if (name_value->Equals(*it)) { |
+ base::StringValue name_value(name); |
+ for (const auto& entity : *entity_list) { |
+ if (name_value.Equals(entity.get())) |
actual_count++; |
- } |
} |
} |