Use base::JSONReader::ReadDeprecated() in various [h-z]* directories.

This is part of the process to help migrate base::JSONReader::Read() to
return base::Optional<base::Value>.

Do the same for ReadAndReturnError() and ReadToValue().

BUG=925165
TBR=eroman@chromium.org,pfeldman@chromium.org,sandersd@chromium.org,sergeyu@chromium.org,thakis@chromium.org

Change-Id: I0550baa36f24e6b27a4479543e55c8734c3c6956
Reviewed-on: https://chromium-review.googlesource.com/c/1476099
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632889}
diff --git a/headless/lib/browser/headless_devtools_client_impl.cc b/headless/lib/browser/headless_devtools_client_impl.cc
index 1e94c0d..a61b18d7 100644
--- a/headless/lib/browser/headless_devtools_client_impl.cc
+++ b/headless/lib/browser/headless_devtools_client_impl.cc
@@ -131,7 +131,8 @@
 
 void HeadlessDevToolsClientImpl::SendRawDevToolsMessage(
     const std::string& json_message) {
-  std::unique_ptr<base::Value> message = base::JSONReader::Read(json_message);
+  std::unique_ptr<base::Value> message =
+      base::JSONReader::ReadDeprecated(json_message);
   if (!message->is_dict()) {
     LOG(ERROR) << "Malformed raw message";
     return;
@@ -153,7 +154,7 @@
     const std::string& json_message) {
   // LOG(ERROR) << "[RECV] " << json_message;
   std::unique_ptr<base::Value> message =
-      base::JSONReader::Read(json_message, base::JSON_PARSE_RFC);
+      base::JSONReader::ReadDeprecated(json_message, base::JSON_PARSE_RFC);
   if (!message || !message->is_dict()) {
     NOTREACHED() << "Badly formed reply " << json_message;
     return;
diff --git a/headless/public/domains/types_unittest.cc b/headless/public/domains/types_unittest.cc
index 40ee31c..f8e0819 100644
--- a/headless/public/domains/types_unittest.cc
+++ b/headless/public/domains/types_unittest.cc
@@ -26,7 +26,7 @@
 
 TEST(TypesTest, IntegerPropertyParseError) {
   const char json[] = "{\"entryId\": \"foo\"}";
-  std::unique_ptr<base::Value> object = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> object = base::JSONReader::ReadDeprecated(json);
   ASSERT_TRUE(object);
 
 #if DCHECK_IS_ON()
@@ -52,7 +52,7 @@
 
 TEST(TypesTest, BooleanPropertyParseError) {
   const char json[] = "{\"suppressed\": \"foo\"}";
-  std::unique_ptr<base::Value> object = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> object = base::JSONReader::ReadDeprecated(json);
   ASSERT_TRUE(object);
 
 #if DCHECK_IS_ON()
@@ -76,7 +76,7 @@
 
 TEST(TypesTest, DoublePropertyParseError) {
   const char json[] = "{\"latitude\": \"foo\"}";
-  std::unique_ptr<base::Value> object = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> object = base::JSONReader::ReadDeprecated(json);
   ASSERT_TRUE(object);
 
 #if DCHECK_IS_ON()
@@ -99,7 +99,7 @@
 
 TEST(TypesTest, StringPropertyParseError) {
   const char json[] = "{\"url\": false}";
-  std::unique_ptr<base::Value> object = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> object = base::JSONReader::ReadDeprecated(json);
   ASSERT_TRUE(object);
 
 #if DCHECK_IS_ON()
@@ -124,7 +124,7 @@
 
 TEST(TypesTest, EnumPropertyParseError) {
   const char json[] = "{\"type\": false}";
-  std::unique_ptr<base::Value> object = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> object = base::JSONReader::ReadDeprecated(json);
   ASSERT_TRUE(object);
 
 #if DCHECK_IS_ON()
@@ -162,7 +162,7 @@
 
 TEST(TypesTest, ArrayPropertyParseError) {
   const char json[] = "{\"nodeIds\": true}";
-  std::unique_ptr<base::Value> object = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> object = base::JSONReader::ReadDeprecated(json);
   ASSERT_TRUE(object);
 
 #if DCHECK_IS_ON()
@@ -191,7 +191,7 @@
 
 TEST(TypesTest, ObjectPropertyParseError) {
   const char json[] = "{\"result\": 42}";
-  std::unique_ptr<base::Value> object = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> object = base::JSONReader::ReadDeprecated(json);
   ASSERT_TRUE(object);
 
 #if DCHECK_IS_ON()
diff --git a/headless/test/headless_js_bindings_browsertest.cc b/headless/test/headless_js_bindings_browsertest.cc
index 2f62c0a..c9265ea 100644
--- a/headless/test/headless_js_bindings_browsertest.cc
+++ b/headless/test/headless_js_bindings_browsertest.cc
@@ -145,7 +145,7 @@
 
   void OnMessageFromJS(const std::string& json_message) {
     std::unique_ptr<base::Value> message =
-        base::JSONReader::Read(json_message, base::JSON_PARSE_RFC);
+        base::JSONReader::ReadDeprecated(json_message, base::JSON_PARSE_RFC);
     const base::Value* method_value = message->FindKey("method");
     if (!method_value) {
       FinishAsynchronousTest();
diff --git a/headless/test/headless_protocol_browsertest.cc b/headless/test/headless_protocol_browsertest.cc
index b2b7c63a9..ed4bcdd 100644
--- a/headless/test/headless_protocol_browsertest.cc
+++ b/headless/test/headless_protocol_browsertest.cc
@@ -104,7 +104,8 @@
   // runtime::Observer implementation.
   void OnBindingCalled(const runtime::BindingCalledParams& params) override {
     std::string json_message = params.GetPayload();
-    std::unique_ptr<base::Value> message = base::JSONReader::Read(json_message);
+    std::unique_ptr<base::Value> message =
+        base::JSONReader::ReadDeprecated(json_message);
     const base::DictionaryValue* message_dict;
     const base::DictionaryValue* params_dict;
     std::string method;
diff --git a/jingle/glue/utils.cc b/jingle/glue/utils.cc
index 66fc3b9..57c1410 100644
--- a/jingle/glue/utils.cc
+++ b/jingle/glue/utils.cc
@@ -77,8 +77,8 @@
 
 bool DeserializeP2PCandidate(const std::string& candidate_str,
                              cricket::Candidate* candidate) {
-  std::unique_ptr<base::Value> value(
-      base::JSONReader::Read(candidate_str, base::JSON_ALLOW_TRAILING_COMMAS));
+  std::unique_ptr<base::Value> value(base::JSONReader::ReadDeprecated(
+      candidate_str, base::JSON_ALLOW_TRAILING_COMMAS));
   if (!value.get() || !value->is_dict()) {
     return false;
   }
diff --git a/media/cast/receiver/video_decoder.cc b/media/cast/receiver/video_decoder.cc
index 74d8d80..7278f89d 100644
--- a/media/cast/receiver/video_decoder.cc
+++ b/media/cast/receiver/video_decoder.cc
@@ -199,7 +199,7 @@
     // Make sure this is a JSON string.
     if (!len || data[0] != '{')
       return NULL;
-    std::unique_ptr<base::Value> values(base::JSONReader::Read(
+    std::unique_ptr<base::Value> values(base::JSONReader::ReadDeprecated(
         base::StringPiece(reinterpret_cast<char*>(data), len)));
     if (!values)
       return NULL;
diff --git a/media/cdm/aes_decryptor_unittest.cc b/media/cdm/aes_decryptor_unittest.cc
index 9c918a92..0664e40 100644
--- a/media/cdm/aes_decryptor_unittest.cc
+++ b/media/cdm/aes_decryptor_unittest.cc
@@ -59,7 +59,8 @@
 }
 MATCHER(IsJSONDictionary, "") {
   std::string result(arg.begin(), arg.end());
-  std::unique_ptr<base::Value> root(base::JSONReader().ReadToValue(result));
+  std::unique_ptr<base::Value> root(
+      base::JSONReader().ReadToValueDeprecated(result));
   return (root.get() && root->type() == base::Value::Type::DICTIONARY);
 }
 MATCHER(IsNullTime, "") {
diff --git a/media/cdm/json_web_key.cc b/media/cdm/json_web_key.cc
index aec3796e..3b3ba1c 100644
--- a/media/cdm/json_web_key.cc
+++ b/media/cdm/json_web_key.cc
@@ -172,7 +172,8 @@
     return false;
   }
 
-  std::unique_ptr<base::Value> root(base::JSONReader().ReadToValue(jwk_set));
+  std::unique_ptr<base::Value> root(
+      base::JSONReader().ReadToValueDeprecated(jwk_set));
   if (!root.get() || root->type() != base::Value::Type::DICTIONARY) {
     DVLOG(1) << "Not valid JSON: " << jwk_set << ", root: " << root.get();
     return false;
@@ -241,7 +242,8 @@
     return false;
   }
 
-  std::unique_ptr<base::Value> root(base::JSONReader().ReadToValue(input));
+  std::unique_ptr<base::Value> root(
+      base::JSONReader().ReadToValueDeprecated(input));
   if (!root.get() || root->type() != base::Value::Type::DICTIONARY) {
     error_message->assign("Not valid JSON: ");
     error_message->append(ShortenTo64Characters(input));
@@ -375,7 +377,7 @@
   }
 
   std::unique_ptr<base::Value> root(
-      base::JSONReader().ReadToValue(license_as_str));
+      base::JSONReader().ReadToValueDeprecated(license_as_str));
   if (!root.get() || root->type() != base::Value::Type::DICTIONARY) {
     DVLOG(1) << "Not valid JSON: " << license_as_str;
     return false;
diff --git a/media/gpu/test/image.cc b/media/gpu/test/image.cc
index 41f6042..6585c9b5 100644
--- a/media/gpu/test/image.cc
+++ b/media/gpu/test/image.cc
@@ -103,7 +103,8 @@
   }
 
   base::JSONReader reader;
-  std::unique_ptr<base::Value> metadata(reader.ReadToValue(json_data));
+  std::unique_ptr<base::Value> metadata(
+      reader.ReadToValueDeprecated(json_data));
   if (!metadata) {
     VLOGF(1) << "Failed to parse image metadata: " << json_path << ": "
              << reader.GetErrorMessage();
diff --git a/media/gpu/test/video_player/video.cc b/media/gpu/test/video_player/video.cc
index 47a8e3f..ca90ead 100644
--- a/media/gpu/test/video_player/video.cc
+++ b/media/gpu/test/video_player/video.cc
@@ -124,7 +124,8 @@
   }
 
   base::JSONReader reader;
-  std::unique_ptr<base::Value> metadata(reader.ReadToValue(json_data));
+  std::unique_ptr<base::Value> metadata(
+      reader.ReadToValueDeprecated(json_data));
   if (!metadata) {
     VLOGF(1) << "Failed to parse video metadata: " << json_path << ": "
              << reader.GetErrorMessage();
diff --git a/net/cert/crl_set.cc b/net/cert/crl_set.cc
index 785f6ab1..93d3a16 100644
--- a/net/cert/crl_set.cc
+++ b/net/cert/crl_set.cc
@@ -54,8 +54,8 @@
   const base::StringPiece header_bytes(data->data(), header_len);
   data->remove_prefix(header_len);
 
-  std::unique_ptr<base::Value> header =
-      base::JSONReader::Read(header_bytes, base::JSON_ALLOW_TRAILING_COMMAS);
+  std::unique_ptr<base::Value> header = base::JSONReader::ReadDeprecated(
+      header_bytes, base::JSON_ALLOW_TRAILING_COMMAS);
   if (header.get() == nullptr)
     return nullptr;
 
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
index 99151cd..ee4e7c5 100644
--- a/net/http/http_server_properties_manager_unittest.cc
+++ b/net/http/http_server_properties_manager_unittest.cc
@@ -1242,7 +1242,7 @@
 }
 
 TEST_P(HttpServerPropertiesManagerTest, AddToAlternativeServiceMap) {
-  std::unique_ptr<base::Value> server_value = base::JSONReader::Read(
+  std::unique_ptr<base::Value> server_value = base::JSONReader::ReadDeprecated(
       "{\"alternative_service\":[{\"port\":443,\"protocol_str\":\"h2\"},"
       "{\"port\":123,\"protocol_str\":\"quic\","
       "\"expiration\":\"9223372036854775807\"},{\"host\":\"example.org\","
@@ -1294,7 +1294,7 @@
 
 // Regression test for https://crbug.com/615497.
 TEST_P(HttpServerPropertiesManagerTest, DoNotLoadAltSvcForInsecureOrigins) {
-  std::unique_ptr<base::Value> server_value = base::JSONReader::Read(
+  std::unique_ptr<base::Value> server_value = base::JSONReader::ReadDeprecated(
       "{\"alternative_service\":[{\"port\":443,\"protocol_str\":\"h2\","
       "\"expiration\":\"9223372036854775807\"}]}");
   ASSERT_TRUE(server_value);
@@ -1515,7 +1515,7 @@
 }
 
 TEST_P(HttpServerPropertiesManagerTest, ReadAdvertisedVersionsFromPref) {
-  std::unique_ptr<base::Value> server_value = base::JSONReader::Read(
+  std::unique_ptr<base::Value> server_value = base::JSONReader::ReadDeprecated(
       "{\"alternative_service\":["
       "{\"port\":443,\"protocol_str\":\"quic\"},"
       "{\"port\":123,\"protocol_str\":\"quic\","
@@ -1686,7 +1686,7 @@
   std::string expiration_str =
       base::NumberToString(static_cast<int64_t>(one_day_from_now_.ToTimeT()));
 
-  std::unique_ptr<base::Value> server_value = base::JSONReader::Read(
+  std::unique_ptr<base::Value> server_value = base::JSONReader::ReadDeprecated(
       "{"
       "\"broken_alternative_services\":["
       "{\"broken_until\":\"" +
diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc
index 74c7c93..ee788d8 100644
--- a/net/http/transport_security_persister.cc
+++ b/net/http/transport_security_persister.cc
@@ -292,7 +292,8 @@
 bool TransportSecurityPersister::Deserialize(const std::string& serialized,
                                              bool* dirty,
                                              TransportSecurityState* state) {
-  std::unique_ptr<base::Value> value = base::JSONReader::Read(serialized);
+  std::unique_ptr<base::Value> value =
+      base::JSONReader::ReadDeprecated(serialized);
   base::DictionaryValue* dict_value = NULL;
   if (!value.get() || !value->GetAsDictionary(&dict_value))
     return false;
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc
index 8822b6c..e8f1cae 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -239,7 +239,7 @@
     const scoped_refptr<X509Certificate>& served_certificate_chain,
     const scoped_refptr<X509Certificate>& validated_certificate_chain,
     const HashValueVector& known_pins) {
-  std::unique_ptr<base::Value> value(base::JSONReader::Read(report));
+  std::unique_ptr<base::Value> value(base::JSONReader::ReadDeprecated(report));
   ASSERT_TRUE(value);
   ASSERT_TRUE(value->is_dict());
 
diff --git a/net/log/file_net_log_observer_unittest.cc b/net/log/file_net_log_observer_unittest.cc
index ce841283..19de9bd 100644
--- a/net/log/file_net_log_observer_unittest.cc
+++ b/net/log/file_net_log_observer_unittest.cc
@@ -127,7 +127,7 @@
   }
 
   base::JSONReader reader;
-  container = reader.ReadToValue(input);
+  container = reader.ReadToValueDeprecated(input);
   if (!container) {
     return ::testing::AssertionFailure() << reader.GetErrorMessage();
   }
diff --git a/net/log/trace_net_log_observer_unittest.cc b/net/log/trace_net_log_observer_unittest.cc
index 3085d6122..3d188e0 100644
--- a/net/log/trace_net_log_observer_unittest.cc
+++ b/net/log/trace_net_log_observer_unittest.cc
@@ -108,8 +108,8 @@
     trace_buffer_.Finish();
 
     std::unique_ptr<base::Value> trace_value;
-    trace_value =
-        base::JSONReader::Read(json_output_.json_output, base::JSON_PARSE_RFC);
+    trace_value = base::JSONReader::ReadDeprecated(json_output_.json_output,
+                                                   base::JSON_PARSE_RFC);
 
     ASSERT_TRUE(trace_value) << json_output_.json_output;
     base::ListValue* trace_events = nullptr;
diff --git a/net/network_error_logging/network_error_logging_service.cc b/net/network_error_logging/network_error_logging_service.cc
index 20e14ba..cceffe0 100644
--- a/net/network_error_logging/network_error_logging_service.cc
+++ b/net/network_error_logging/network_error_logging_service.cc
@@ -403,8 +403,8 @@
     if (json_value.size() > kMaxJsonSize)
       return HeaderOutcome::DISCARDED_JSON_TOO_BIG;
 
-    std::unique_ptr<base::Value> value =
-        base::JSONReader::Read(json_value, base::JSON_PARSE_RFC, kMaxJsonDepth);
+    std::unique_ptr<base::Value> value = base::JSONReader::ReadDeprecated(
+        json_value, base::JSON_PARSE_RFC, kMaxJsonDepth);
     if (!value)
       return HeaderOutcome::DISCARDED_JSON_INVALID;
 
diff --git a/net/reporting/reporting_header_parser_fuzzer.cc b/net/reporting/reporting_header_parser_fuzzer.cc
index f050eae..56a4eba 100644
--- a/net/reporting/reporting_header_parser_fuzzer.cc
+++ b/net/reporting/reporting_header_parser_fuzzer.cc
@@ -37,7 +37,7 @@
   // Emulate what ReportingService::OnHeader does before calling
   // ReportingHeaderParser::ParseHeader.
   std::unique_ptr<base::Value> data_value =
-      base::JSONReader::Read("[" + data_json + "]");
+      base::JSONReader::ReadDeprecated("[" + data_json + "]");
   if (!data_value)
     return;
 
diff --git a/net/reporting/reporting_header_parser_unittest.cc b/net/reporting/reporting_header_parser_unittest.cc
index 253b5ec..657a5d1 100644
--- a/net/reporting/reporting_header_parser_unittest.cc
+++ b/net/reporting/reporting_header_parser_unittest.cc
@@ -26,7 +26,7 @@
  protected:
   void ParseHeader(const GURL& url, const std::string& json) {
     std::unique_ptr<base::Value> value =
-        base::JSONReader::Read("[" + json + "]");
+        base::JSONReader::ReadDeprecated("[" + json + "]");
     if (value)
       ReportingHeaderParser::ParseHeader(context(), url, std::move(value));
   }
diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc
index 58122f8..ae9f290 100644
--- a/net/reporting/reporting_service.cc
+++ b/net/reporting/reporting_service.cc
@@ -66,8 +66,9 @@
       return;
     }
 
-    std::unique_ptr<base::Value> header_value = base::JSONReader::Read(
-        "[" + header_string + "]", base::JSON_PARSE_RFC, kMaxJsonDepth);
+    std::unique_ptr<base::Value> header_value =
+        base::JSONReader::ReadDeprecated("[" + header_string + "]",
+                                         base::JSON_PARSE_RFC, kMaxJsonDepth);
     if (!header_value) {
       ReportingHeaderParser::RecordHeaderDiscardedForJsonInvalid();
       return;
diff --git a/net/reporting/reporting_test_util.cc b/net/reporting/reporting_test_util.cc
index 321cbf4..0eb369a 100644
--- a/net/reporting/reporting_test_util.cc
+++ b/net/reporting/reporting_test_util.cc
@@ -53,7 +53,7 @@
   const GURL& url() const override { return url_; }
   const std::string& json() const override { return json_; }
   std::unique_ptr<base::Value> GetValue() const override {
-    return base::JSONReader::Read(json_);
+    return base::JSONReader::ReadDeprecated(json_);
   }
 
   void Complete(ReportingUploader::Outcome outcome) override {
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index 6dea8c5..5ae2891 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -502,7 +502,8 @@
                                            int* port) {
   VLOG(1) << "Server data: " << server_data;
   base::JSONReader json_reader;
-  std::unique_ptr<base::Value> value(json_reader.ReadToValue(server_data));
+  std::unique_ptr<base::Value> value(
+      json_reader.ReadToValueDeprecated(server_data));
   if (!value.get() || !value->is_dict()) {
     LOG(ERROR) << "Could not parse server data: "
                << json_reader.GetErrorMessage();
diff --git a/net/test/spawned_test_server/remote_test_server_config.cc b/net/test/spawned_test_server/remote_test_server_config.cc
index 74a15b8..3b1f4d4 100644
--- a/net/test/spawned_test_server/remote_test_server_config.cc
+++ b/net/test/spawned_test_server/remote_test_server_config.cc
@@ -59,8 +59,8 @@
   if (!ReadFileToString(config_path, &config_json))
     LOG(FATAL) << "Failed to read " << config_path.value();
 
-  std::unique_ptr<base::DictionaryValue> config =
-      base::DictionaryValue::From(base::JSONReader::Read(config_json));
+  std::unique_ptr<base::DictionaryValue> config = base::DictionaryValue::From(
+      base::JSONReader::ReadDeprecated(config_json));
   if (!config)
     LOG(FATAL) << "Failed to parse " << config_path.value();
 
diff --git a/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc b/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
index 40d2d1de..395ab97 100644
--- a/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
+++ b/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
@@ -62,7 +62,7 @@
     return false;
   }
 
-  std::unique_ptr<base::Value> value = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> value = base::JSONReader::ReadDeprecated(json);
   if (!value.get()) {
     LOG(ERROR) << filename << ": couldn't parse JSON.";
     return false;
diff --git a/net/tools/transport_security_state_generator/input_file_parsers.cc b/net/tools/transport_security_state_generator/input_file_parsers.cc
index 1046ff6..3da453f 100644
--- a/net/tools/transport_security_state_generator/input_file_parsers.cc
+++ b/net/tools/transport_security_state_generator/input_file_parsers.cc
@@ -310,7 +310,7 @@
       "test",        "public-suffix", "google",      "custom",
       "bulk-legacy", "bulk-18-weeks", "bulk-1-year", "public-suffix-requested"};
 
-  std::unique_ptr<base::Value> value = base::JSONReader::Read(json);
+  std::unique_ptr<base::Value> value = base::JSONReader::ReadDeprecated(json);
   base::DictionaryValue* dict_value = nullptr;
   if (!value.get() || !value->GetAsDictionary(&dict_value)) {
     LOG(ERROR) << "Could not parse the input JSON file";
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 57ac044..4dda387 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -6664,7 +6664,7 @@
   EXPECT_EQ("application/json; charset=utf-8",
             mock_report_sender.latest_content_type());
   std::unique_ptr<base::Value> value(
-      base::JSONReader::Read(mock_report_sender.latest_report()));
+      base::JSONReader::ReadDeprecated(mock_report_sender.latest_report()));
   ASSERT_TRUE(value);
   ASSERT_TRUE(value->is_dict());
   base::DictionaryValue* report_dict;
diff --git a/printing/print_settings_conversion_unittest.cc b/printing/print_settings_conversion_unittest.cc
index 0d44a264..56e5e0e9 100644
--- a/printing/print_settings_conversion_unittest.cc
+++ b/printing/print_settings_conversion_unittest.cc
@@ -47,7 +47,8 @@
 }
 
 TEST(PrintSettingsConversionTest, ConversionTest) {
-  std::unique_ptr<base::Value> value = base::JSONReader::Read(kPrinterSettings);
+  std::unique_ptr<base::Value> value =
+      base::JSONReader::ReadDeprecated(kPrinterSettings);
   ASSERT_TRUE(value);
   PrintSettings settings;
   bool success = PrintSettingsFromJobSettings(
@@ -61,7 +62,8 @@
 
 #if defined(OS_CHROMEOS)
 TEST(PrintSettingsConversionTest, ConversionTest_DontSendUsername) {
-  std::unique_ptr<base::Value> value = base::JSONReader::Read(kPrinterSettings);
+  std::unique_ptr<base::Value> value =
+      base::JSONReader::ReadDeprecated(kPrinterSettings);
   ASSERT_TRUE(value);
   value->SetKey(kSettingSendUserInfo, base::Value(false));
   PrintSettings settings;
diff --git a/third_party/blink/common/origin_policy/origin_policy_parser.cc b/third_party/blink/common/origin_policy/origin_policy_parser.cc
index df42efe..8c03c232 100644
--- a/third_party/blink/common/origin_policy/origin_policy_parser.cc
+++ b/third_party/blink/common/origin_policy/origin_policy_parser.cc
@@ -28,7 +28,8 @@
   if (policy_text.empty())
     return false;
 
-  std::unique_ptr<base::Value> json = base::JSONReader::Read(policy_text);
+  std::unique_ptr<base::Value> json =
+      base::JSONReader::ReadDeprecated(policy_text);
   if (!json || !json->is_dict())
     return false;
 
diff --git a/third_party/blink/common/origin_trials/trial_token.cc b/third_party/blink/common/origin_trials/trial_token.cc
index 44be9a6a..5680f9f 100644
--- a/third_party/blink/common/origin_trials/trial_token.cc
+++ b/third_party/blink/common/origin_trials/trial_token.cc
@@ -168,8 +168,8 @@
     return nullptr;
   }
 
-  std::unique_ptr<base::DictionaryValue> datadict =
-      base::DictionaryValue::From(base::JSONReader::Read(token_payload));
+  std::unique_ptr<base::DictionaryValue> datadict = base::DictionaryValue::From(
+      base::JSONReader::ReadDeprecated(token_payload));
   if (!datadict) {
     return nullptr;
   }
diff --git a/third_party/inspector_protocol/lib/base_string_adapter_cc.template b/third_party/inspector_protocol/lib/base_string_adapter_cc.template
index ed33164..5c4b8c6 100644
--- a/third_party/inspector_protocol/lib/base_string_adapter_cc.template
+++ b/third_party/inspector_protocol/lib/base_string_adapter_cc.template
@@ -136,7 +136,7 @@
         reinterpret_cast<const uint8_t*>(message.data()),
         message.length());
   }
-  std::unique_ptr<base::Value> value = base::JSONReader::Read(message);
+  std::unique_ptr<base::Value> value = base::JSONReader::ReadDeprecated(message);
   return toProtocolValue(value.get(), 1000);
 }
 
diff --git a/third_party/libaddressinput/chromium/json.cc b/third_party/libaddressinput/chromium/json.cc
index 2423e91..feaa70a 100644
--- a/third_party/libaddressinput/chromium/json.cc
+++ b/third_party/libaddressinput/chromium/json.cc
@@ -28,7 +28,7 @@
   // |json| is converted to a |c_str()| here because rapidjson and other parts
   // of the standalone library use char* rather than std::string.
   ::std::unique_ptr<const base::Value> parsed(
-      base::JSONReader::Read(json.c_str()));
+      base::JSONReader::ReadDeprecated(json.c_str()));
   *parser_error = !parsed || !parsed->is_dict();
 
   if (*parser_error)
diff --git a/tools/json_schema_compiler/test/test_util.cc b/tools/json_schema_compiler/test/test_util.cc
index fd22ae6..a88184ba 100644
--- a/tools/json_schema_compiler/test/test_util.cc
+++ b/tools/json_schema_compiler/test/test_util.cc
@@ -16,8 +16,9 @@
 std::unique_ptr<base::Value> ReadJson(const base::StringPiece& json) {
   int error_code;
   std::string error_msg;
-  std::unique_ptr<base::Value> result(base::JSONReader::ReadAndReturnError(
-      json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code, &error_msg));
+  std::unique_ptr<base::Value> result(
+      base::JSONReader::ReadAndReturnErrorDeprecated(
+          json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code, &error_msg));
   // CHECK not ASSERT since passing invalid |json| is a test error.
   CHECK(result) << error_msg;
   return result;
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index 3036ff3..9f57e04e 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -983,7 +983,8 @@
   std::string json;
   debug_info->AppendAsTraceFormat(&json);
   base::JSONReader json_reader;
-  std::unique_ptr<base::Value> debug_info_value(json_reader.ReadToValue(json));
+  std::unique_ptr<base::Value> debug_info_value(
+      json_reader.ReadToValueDeprecated(json));
   EXPECT_TRUE(debug_info_value);
   EXPECT_TRUE(debug_info_value->is_dict());
   base::DictionaryValue* dictionary = 0;
diff --git a/ui/display/manager/json_converter_unittest.cc b/ui/display/manager/json_converter_unittest.cc
index 071f3cc..4554c1e4 100644
--- a/ui/display/manager/json_converter_unittest.cc
+++ b/ui/display/manager/json_converter_unittest.cc
@@ -49,8 +49,9 @@
       "}";
   int error_code = 0, error_line, error_column;
   std::string error_msg;
-  std::unique_ptr<base::Value> read_value(base::JSONReader::ReadAndReturnError(
-      data, 0, &error_code, &error_msg, &error_line, &error_column));
+  std::unique_ptr<base::Value> read_value(
+      base::JSONReader::ReadAndReturnErrorDeprecated(
+          data, 0, &error_code, &error_msg, &error_line, &error_column));
   ASSERT_EQ(0, error_code) << error_msg << " at " << error_line << ":"
                            << error_column;
   EXPECT_TRUE(value.Equals(read_value.get()));
@@ -72,8 +73,9 @@
       "}";
   int error_code = 0, error_line, error_column;
   std::string error_msg;
-  std::unique_ptr<base::Value> read_value(base::JSONReader::ReadAndReturnError(
-      data, 0, &error_code, &error_msg, &error_line, &error_column));
+  std::unique_ptr<base::Value> read_value(
+      base::JSONReader::ReadAndReturnErrorDeprecated(
+          data, 0, &error_code, &error_msg, &error_line, &error_column));
   ASSERT_EQ(0, error_code) << error_msg << " at " << error_line << ":"
                            << error_column;
 
diff --git a/ui/native_theme/caption_style.cc b/ui/native_theme/caption_style.cc
index 4a94a07..a7c9155 100644
--- a/ui/native_theme/caption_style.cc
+++ b/ui/native_theme/caption_style.cc
@@ -16,7 +16,7 @@
 // static
 CaptionStyle CaptionStyle::FromSpec(const std::string& spec) {
   CaptionStyle style;
-  std::unique_ptr<base::Value> dict = base::JSONReader::Read(spec);
+  std::unique_ptr<base::Value> dict = base::JSONReader::ReadDeprecated(spec);
 
   if (!dict || !dict->is_dict())
     return style;