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

Unified Diff: base/test/values_test_util.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 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_writer_unittest.cc ('k') | base/values.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/values_test_util.cc
diff --git a/base/test/values_test_util.cc b/base/test/values_test_util.cc
index ab12cfbfd9846294d108ddbb26916b6dc4098291..0cd8ea29f6680d040328d5e40e8ea8e0c0682a00 100644
--- a/base/test/values_test_util.cc
+++ b/base/test/values_test_util.cc
@@ -7,6 +7,7 @@
#include <memory>
#include "base/json/json_reader.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -68,7 +69,7 @@ std::unique_ptr<Value> ParseJson(base::StringPiece json) {
json, base::JSON_ALLOW_TRAILING_COMMAS, NULL, &error_msg);
if (!result) {
ADD_FAILURE() << "Failed to parse \"" << json << "\": " << error_msg;
- result = Value::CreateNullValue();
+ result = MakeUnique<Value>();
}
return result;
}
« no previous file with comments | « base/json/json_writer_unittest.cc ('k') | base/values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698