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

Side by Side Diff: content/browser/gpu/gpu_internals_ui.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 unified diff | Download patch
« no previous file with comments | « content/browser/devtools/protocol_string.cc ('k') | content/child/v8_value_converter_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/gpu_internals_ui.h" 5 #include "content/browser/gpu/gpu_internals_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 "Reset notification strategy", reset_strategy)); 240 "Reset notification strategy", reset_strategy));
241 241
242 basic_info->Append( 242 basic_info->Append(
243 NewDescriptionValuePair("GPU process crash count", 243 NewDescriptionValuePair("GPU process crash count",
244 new base::Value(gpu_info.process_crash_count))); 244 new base::Value(gpu_info.process_crash_count)));
245 245
246 base::DictionaryValue* info = new base::DictionaryValue(); 246 base::DictionaryValue* info = new base::DictionaryValue();
247 info->Set("basic_info", basic_info); 247 info->Set("basic_info", basic_info);
248 248
249 #if defined(OS_WIN) 249 #if defined(OS_WIN)
250 std::unique_ptr<base::Value> dx_info = base::Value::CreateNullValue(); 250 auto dx_info = base::MakeUnique<base::Value>();
251 if (gpu_info.dx_diagnostics.children.size()) 251 if (gpu_info.dx_diagnostics.children.size())
252 dx_info.reset(DxDiagNodeToList(gpu_info.dx_diagnostics)); 252 dx_info.reset(DxDiagNodeToList(gpu_info.dx_diagnostics));
253 info->Set("diagnostics", std::move(dx_info)); 253 info->Set("diagnostics", std::move(dx_info));
254 #endif 254 #endif
255 255
256 #if defined(USE_X11) && !defined(OS_CHROMEOS) 256 #if defined(USE_X11) && !defined(OS_CHROMEOS)
257 basic_info->Append(NewDescriptionValuePair( 257 basic_info->Append(NewDescriptionValuePair(
258 "System visual ID", base::Uint64ToString(gpu_info.system_visual))); 258 "System visual ID", base::Uint64ToString(gpu_info.system_visual)));
259 basic_info->Append(NewDescriptionValuePair( 259 basic_info->Append(NewDescriptionValuePair(
260 "RGBA visual ID", base::Uint64ToString(gpu_info.rgba_visual))); 260 "RGBA visual ID", base::Uint64ToString(gpu_info.rgba_visual)));
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 : WebUIController(web_ui) { 558 : WebUIController(web_ui) {
559 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); 559 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>());
560 560
561 // Set up the chrome://gpu/ source. 561 // Set up the chrome://gpu/ source.
562 BrowserContext* browser_context = 562 BrowserContext* browser_context =
563 web_ui->GetWebContents()->GetBrowserContext(); 563 web_ui->GetWebContents()->GetBrowserContext();
564 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 564 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
565 } 565 }
566 566
567 } // namespace content 567 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol_string.cc ('k') | content/child/v8_value_converter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698