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

Unified Diff: content/browser/android/java/gin_java_script_to_java_types_coercion.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 f65a96aea1832f13afe9a8c1a1989a83c1345297..2af118d4c00ac498551a6747f5e60d6d0f71bb94 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
@@ -392,7 +392,7 @@ jvalue CoerceJavaScriptNullOrUndefinedToJavaValue(JNIEnv* env,
bool coerce_to_string,
GinJavaBridgeError* error) {
bool is_undefined = false;
- scoped_ptr<const GinJavaBridgeValue> gin_value;
+ std::unique_ptr<const GinJavaBridgeValue> gin_value;
if (GinJavaBridgeValue::ContainsGinJavaBridgeValue(value)) {
gin_value = GinJavaBridgeValue::FromValue(value);
if (gin_value->IsType(GinJavaBridgeValue::TYPE_UNDEFINED)) {
@@ -465,7 +465,7 @@ jobject CoerceJavaScriptListToArray(JNIEnv* env,
if (!result) {
return NULL;
}
- scoped_ptr<base::Value> null_value = base::Value::CreateNullValue();
+ std::unique_ptr<base::Value> null_value = base::Value::CreateNullValue();
for (jsize i = 0; i < length; ++i) {
const base::Value* value_element = null_value.get();
list_value->Get(i, &value_element);
@@ -537,7 +537,7 @@ jobject CoerceJavaScriptDictionaryToArray(JNIEnv* env,
if (!result) {
return NULL;
}
- scoped_ptr<base::Value> null_value = base::Value::CreateNullValue();
+ std::unique_ptr<base::Value> null_value = base::Value::CreateNullValue();
for (jsize i = 0; i < length; ++i) {
const std::string key(base::IntToString(i));
const base::Value* value_element = null_value.get();
@@ -573,7 +573,7 @@ jvalue CoerceJavaScriptObjectToJavaValue(JNIEnv* env,
switch (target_type.type) {
case JavaType::TypeObject: {
if (GinJavaBridgeValue::ContainsGinJavaBridgeValue(value)) {
- scoped_ptr<const GinJavaBridgeValue> gin_value(
+ std::unique_ptr<const GinJavaBridgeValue> gin_value(
GinJavaBridgeValue::FromValue(value));
DCHECK(gin_value);
DCHECK(gin_value->IsType(GinJavaBridgeValue::TYPE_OBJECT_ID));
@@ -654,7 +654,7 @@ jvalue CoerceGinJavaBridgeValueToJavaValue(JNIEnv* env,
const ObjectRefs& object_refs,
GinJavaBridgeError* error) {
DCHECK(GinJavaBridgeValue::ContainsGinJavaBridgeValue(value));
- scoped_ptr<const GinJavaBridgeValue> gin_value(
+ std::unique_ptr<const GinJavaBridgeValue> gin_value(
GinJavaBridgeValue::FromValue(value));
switch (gin_value->GetType()) {
case GinJavaBridgeValue::TYPE_UNDEFINED:
« no previous file with comments | « content/browser/android/java/gin_java_method_invocation_helper_unittest.cc ('k') | content/browser/android/java/java_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698