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

Unified Diff: components/error_page/renderer/net_error_helper_core_unittest.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase 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
Index: components/error_page/renderer/net_error_helper_core_unittest.cc
diff --git a/components/error_page/renderer/net_error_helper_core_unittest.cc b/components/error_page/renderer/net_error_helper_core_unittest.cc
index 97897fb335ec875168e6522b346249d5bdebbd19..5ec937761f23b3cd104c16f010f366afd5771251 100644
--- a/components/error_page/renderer/net_error_helper_core_unittest.cc
+++ b/components/error_page/renderer/net_error_helper_core_unittest.cc
@@ -84,13 +84,13 @@ std::string SuggestionsToResponse(const NavigationCorrection* corrections,
for (int i = 0; i < num_corrections; ++i)
url_corrections->Append(corrections[i].ToValue());
- scoped_ptr<base::DictionaryValue> response(new base::DictionaryValue());
- response->Set("result.UrlCorrections", url_corrections);
- response->SetString("result.eventId", kNavigationCorrectionEventId);
- response->SetString("result.fingerprint", kNavigationCorrectionFingerprint);
+ base::DictionaryValue response;
+ response.Set("result.UrlCorrections", url_corrections);
+ response.SetString("result.eventId", kNavigationCorrectionEventId);
+ response.SetString("result.fingerprint", kNavigationCorrectionFingerprint);
std::string json;
- base::JSONWriter::Write(response.get(), &json);
+ base::JSONWriter::Write(response, &json);
return json;
}
« no previous file with comments | « components/error_page/renderer/net_error_helper_core.cc ('k') | components/history/core/browser/delete_directive_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698