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

Unified Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge 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: content/browser/gpu/gpu_internals_ui.cc
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index 079c5aae8830a0eed330e6f3cfc075c11f649ae3..7991aa3a79a234c4416a6ad1c4b93a457ab0b36e 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -221,10 +221,10 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
info->Set("basic_info", basic_info);
#if defined(OS_WIN)
- base::Value* dx_info = gpu_info.dx_diagnostics.children.size() ?
- DxDiagNodeToList(gpu_info.dx_diagnostics) :
- base::Value::CreateNullValue();
- info->Set("diagnostics", dx_info);
+ scoped_ptr<base::Value> dx_info = base::Value::CreateNullValue();
+ if (gpu_info.dx_diagnostics.children.size())
+ dx_info.reset(DxDiagNodeToList(gpu_info.dx_diagnostics));
+ info->Set("diagnostics", dx_info.Pass());
#endif
return info;
« no previous file with comments | « content/browser/android/java/gin_java_script_to_java_types_coercion.cc ('k') | content/child/v8_value_converter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698