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

Unified Diff: chrome/browser/local_discovery/privet_url_fetcher.cc

Issue 1124223012: Change JSONReader::ReadToValue to return a scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chromedriver Created 5 years, 7 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 | « base/json/json_reader_unittest.cc ('k') | chrome/test/chromedriver/chrome/mobile_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/privet_url_fetcher.cc
diff --git a/chrome/browser/local_discovery/privet_url_fetcher.cc b/chrome/browser/local_discovery/privet_url_fetcher.cc
index 0a76ed2bc4362b241b70e6924bdb54746f703f66..96726df3f23cfaff68c2a3ebac41e81a3572bcad 100644
--- a/chrome/browser/local_discovery/privet_url_fetcher.cc
+++ b/chrome/browser/local_discovery/privet_url_fetcher.cc
@@ -303,10 +303,7 @@ void PrivetURLFetcher::OnURLFetchCompleteParseData(
}
base::JSONReader json_reader(base::JSON_ALLOW_TRAILING_COMMAS);
- scoped_ptr<base::Value> value;
-
- value.reset(json_reader.ReadToValue(response_str));
-
+ scoped_ptr<base::Value> value = json_reader.ReadToValue(response_str);
if (!value) {
delegate_->OnError(this, JSON_PARSE_ERROR);
return;
« no previous file with comments | « base/json/json_reader_unittest.cc ('k') | chrome/test/chromedriver/chrome/mobile_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698