From 4b5fb7935ed72307ae39ac13badb8ac139a6a775 Mon Sep 17 00:00:00 2001 From: "olli.raula" Date: Mon, 24 Aug 2015 04:51:58 -0700 Subject: [PATCH] Remove use of JSONReader::DeprecatedRead from content/browser/media Remove use of deprecated function DeprecatedRead from content/browser/media BUG=523194 Review URL: https://codereview.chromium.org/1312753003 Cr-Commit-Position: refs/heads/master@{#345050} --- content/browser/media/webrtc_getusermedia_browsertest.cc | 7 +++---- content/browser/media/webrtc_internals_browsertest.cc | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/content/browser/media/webrtc_getusermedia_browsertest.cc b/content/browser/media/webrtc_getusermedia_browsertest.cc index 3763c0b7bd0e..1be3738b6e8f 100644 --- a/content/browser/media/webrtc_getusermedia_browsertest.cc +++ b/content/browser/media/webrtc_getusermedia_browsertest.cc @@ -218,10 +218,9 @@ class MAYBE_WebRtcGetUserMediaBrowserTest: public WebRtcContentBrowserTest { int error_code; std::string error_message; - scoped_ptr value( - base::JSONReader::DeprecatedReadAndReturnError( - devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code, - &error_message)); + scoped_ptr value = base::JSONReader::ReadAndReturnError( + devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code, + &error_message); ASSERT_TRUE(value.get() != NULL) << error_message; EXPECT_EQ(value->GetType(), base::Value::TYPE_LIST); diff --git a/content/browser/media/webrtc_internals_browsertest.cc b/content/browser/media/webrtc_internals_browsertest.cc index 70acc33da3a8..b481559b942b 100644 --- a/content/browser/media/webrtc_internals_browsertest.cc +++ b/content/browser/media/webrtc_internals_browsertest.cc @@ -233,8 +233,8 @@ class MAYBE_WebRtcInternalsBrowserTest: public ContentBrowserTest { "window.domAutomationController.send(" "JSON.stringify(userMediaRequests));", &json_requests)); - scoped_ptr value_requests; - value_requests.reset(base::JSONReader::DeprecatedRead(json_requests)); + scoped_ptr value_requests = + base::JSONReader::Read(json_requests); EXPECT_EQ(base::Value::TYPE_LIST, value_requests->GetType()); @@ -783,8 +783,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, CreatePageDump) { "window.domAutomationController.send(" "JSON.stringify(peerConnectionDataStore));", &dump_json)); - scoped_ptr dump; - dump.reset(base::JSONReader::DeprecatedRead(dump_json)); + scoped_ptr dump = base::JSONReader::Read(dump_json); VerifyPageDumpStructure(dump.get(), 2 /*peer_connection_number*/, 2 /*update_number*/, @@ -803,7 +802,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, CreatePageDump) { "window.domAutomationController.send(" "JSON.stringify(peerConnectionDataStore));", &dump_json)); - dump.reset(base::JSONReader::DeprecatedRead(dump_json)); + dump = base::JSONReader::Read(dump_json); VerifyStatsDump(dump.get(), pc_0, type, id, stats); } -- 2.11.4.GIT