Chromium Code Reviews| Index: chromeos/network/auto_connect_handler_unittest.cc |
| diff --git a/chromeos/network/auto_connect_handler_unittest.cc b/chromeos/network/auto_connect_handler_unittest.cc |
| index a52f60e53dfcdc8dde935e7ee784410e893aed51..b2f0c990faa148c163105f73208ebb0d92b37f54 100644 |
| --- a/chromeos/network/auto_connect_handler_unittest.cc |
| +++ b/chromeos/network/auto_connect_handler_unittest.cc |
| @@ -214,13 +214,14 @@ class AutoConnectHandlerTest : public testing::Test { |
| scoped_ptr<base::ListValue> network_configs(new base::ListValue); |
| if (!network_configs_json.empty()) { |
| std::string error; |
| - base::Value* network_configs_value = |
| - base::JSONReader::DeprecatedReadAndReturnError( |
| - network_configs_json, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, |
| - &error); |
| - ASSERT_TRUE(network_configs_value) << error; |
| + scoped_ptr<base::Value> network_configs_value = |
| + base::JSONReader::ReadAndReturnError(network_configs_json, |
| + base::JSON_ALLOW_TRAILING_COMMAS, |
| + nullptr, &error); |
| + ASSERT_TRUE(network_configs_value.get()) << error; |
|
pneubeck (no reviews)
2015/09/09 11:49:51
it's common to drop the ".get()" for boolean check
|
| base::ListValue* network_configs_list = nullptr; |
| - ASSERT_TRUE(network_configs_value->GetAsList(&network_configs_list)); |
| + ASSERT_TRUE( |
| + network_configs_value.release()->GetAsList(&network_configs_list)); |
|
pneubeck (no reviews)
2015/09/09 11:49:51
can you do the release after we ensured that netwo
|
| network_configs.reset(network_configs_list); |
| } |