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

Unified Diff: content/browser/geolocation/network_location_provider_unittest.cc

Issue 10913221: Fix memory leak in network_location_provider_unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial upload. Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/network_location_provider_unittest.cc
diff --git a/content/browser/geolocation/network_location_provider_unittest.cc b/content/browser/geolocation/network_location_provider_unittest.cc
index 73a711b99bc9e3f9ea6bc08435e24c8bca66ceea..4c87f20072eb65de790fb6e005b45a1b8202929d 100644
--- a/content/browser/geolocation/network_location_provider_unittest.cc
+++ b/content/browser/geolocation/network_location_provider_unittest.cc
@@ -273,13 +273,14 @@ class GeolocationNetworkProviderTest : public testing::Test {
const std::string& upload_data = request.upload_data();
ASSERT_FALSE(upload_data.empty());
std::string json_parse_error_msg;
- base::Value* parsed_json = base::JSONReader::ReadAndReturnError(
- upload_data,
- base::JSON_PARSE_RFC,
- NULL,
- &json_parse_error_msg);
+ scoped_ptr<base::Value> parsed_json(
+ base::JSONReader::ReadAndReturnError(
+ upload_data,
+ base::JSON_PARSE_RFC,
+ NULL,
+ &json_parse_error_msg));
EXPECT_TRUE(json_parse_error_msg.empty());
- ASSERT_TRUE(parsed_json != NULL);
+ ASSERT_TRUE(parsed_json.get() != NULL);
const base::DictionaryValue* request_json;
ASSERT_TRUE(parsed_json->GetAsDictionary(&request_json));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698