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

Unified Diff: chromeos/network/auto_connect_handler_unittest.cc

Issue 1328233002: Ramove use of JSONReader::DeprecatedRead from chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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: 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);
}

Powered by Google App Engine
This is Rietveld 408576698