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

Unified Diff: content/browser/android/java/gin_java_script_to_java_types_coercion.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
Index: content/browser/android/java/gin_java_script_to_java_types_coercion.cc
diff --git a/content/browser/android/java/gin_java_script_to_java_types_coercion.cc b/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
index afc71437195b6d8a12e8d86c082a531643d40054..a7fdc628f306cb677c046e39615c0bc1a10cb4fe 100644
--- a/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
+++ b/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
@@ -11,6 +11,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -465,7 +466,7 @@ jobject CoerceJavaScriptListToArray(JNIEnv* env,
if (!result) {
return NULL;
}
- std::unique_ptr<base::Value> null_value = base::Value::CreateNullValue();
+ auto null_value = base::MakeUnique<base::Value>();
for (jsize i = 0; i < length; ++i) {
const base::Value* value_element = null_value.get();
list_value->Get(i, &value_element);
@@ -537,7 +538,7 @@ jobject CoerceJavaScriptDictionaryToArray(JNIEnv* env,
if (!result) {
return NULL;
}
- std::unique_ptr<base::Value> null_value = base::Value::CreateNullValue();
+ auto null_value = base::MakeUnique<base::Value>();
for (jsize i = 0; i < length; ++i) {
const std::string key(base::IntToString(i));
const base::Value* value_element = null_value.get();
« no previous file with comments | « content/browser/android/java/gin_java_method_invocation_helper.cc ('k') | content/browser/devtools/protocol_string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698