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

Unified Diff: components/history/core/browser/web_history_service.cc

Issue 1323923002: Remove use of JSONReader::DeprecatedRead from components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Error fix 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
« no previous file with comments | « components/dom_distiller/ios/distiller_page_ios.mm ('k') | components/json_schema/json_schema_validator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/web_history_service.cc
diff --git a/components/history/core/browser/web_history_service.cc b/components/history/core/browser/web_history_service.cc
index 7a4e0ede3d2c7460afd4ee780063149988255f65..b830fafd095378864964fd832d762a3dcd72d9bd 100644
--- a/components/history/core/browser/web_history_service.cc
+++ b/components/history/core/browser/web_history_service.cc
@@ -312,10 +312,10 @@ scoped_ptr<base::DictionaryValue> WebHistoryService::ReadResponse(
WebHistoryService::Request* request) {
scoped_ptr<base::DictionaryValue> result;
if (request->GetResponseCode() == net::HTTP_OK) {
- base::Value* value =
- base::JSONReader::DeprecatedRead(request->GetResponseBody());
- if (value && value->IsType(base::Value::TYPE_DICTIONARY))
- result.reset(static_cast<base::DictionaryValue*>(value));
+ scoped_ptr<base::Value> value =
+ base::JSONReader::Read(request->GetResponseBody());
+ if (value.get() && value.get()->IsType(base::Value::TYPE_DICTIONARY))
+ result.reset(static_cast<base::DictionaryValue*>(value.release()));
else
DLOG(WARNING) << "Non-JSON response received from history server.";
}
« no previous file with comments | « components/dom_distiller/ios/distiller_page_ios.mm ('k') | components/json_schema/json_schema_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698