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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2891933004: Remove raw base::DictionaryValue::Set in //content (Closed)
Patch Set: Rebase Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_data_manager_impl_private.h" 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/memory/ptr_util.h"
15 #include "base/metrics/field_trial.h" 16 #include "base/metrics/field_trial.h"
16 #include "base/metrics/histogram_macros.h" 17 #include "base/metrics/histogram_macros.h"
17 #include "base/metrics/sparse_histogram.h" 18 #include "base/metrics/sparse_histogram.h"
18 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
19 #include "base/strings/string_piece.h" 20 #include "base/strings/string_piece.h"
20 #include "base/strings/string_split.h" 21 #include "base/strings/string_split.h"
21 #include "base/strings/stringprintf.h" 22 #include "base/strings/stringprintf.h"
22 #include "base/trace_event/trace_event.h" 23 #include "base/trace_event/trace_event.h"
23 #include "base/version.h" 24 #include "base/version.h"
24 #include "build/build_config.h" 25 #include "build/build_config.h"
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 return; 1009 return;
1009 } 1010 }
1010 { 1011 {
1011 gpu_info_.process_crash_count = GpuProcessHost::gpu_crash_count(); 1012 gpu_info_.process_crash_count = GpuProcessHost::gpu_crash_count();
1012 GpuDataManagerImpl::UnlockedSession session(owner_); 1013 GpuDataManagerImpl::UnlockedSession session(owner_);
1013 observer_list_->Notify( 1014 observer_list_->Notify(
1014 FROM_HERE, &GpuDataManagerObserver::OnGpuProcessCrashed, exit_code); 1015 FROM_HERE, &GpuDataManagerObserver::OnGpuProcessCrashed, exit_code);
1015 } 1016 }
1016 } 1017 }
1017 1018
1018 base::ListValue* GpuDataManagerImplPrivate::GetLogMessages() const { 1019 std::unique_ptr<base::ListValue> GpuDataManagerImplPrivate::GetLogMessages()
1019 base::ListValue* value = new base::ListValue; 1020 const {
1021 auto value = base::MakeUnique<base::ListValue>();
1020 for (size_t ii = 0; ii < log_messages_.size(); ++ii) { 1022 for (size_t ii = 0; ii < log_messages_.size(); ++ii) {
1021 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 1023 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
1022 dict->SetInteger("level", log_messages_[ii].level); 1024 dict->SetInteger("level", log_messages_[ii].level);
1023 dict->SetString("header", log_messages_[ii].header); 1025 dict->SetString("header", log_messages_[ii].header);
1024 dict->SetString("message", log_messages_[ii].message); 1026 dict->SetString("message", log_messages_[ii].message);
1025 value->Append(std::move(dict)); 1027 value->Append(std::move(dict));
1026 } 1028 }
1027 return value; 1029 return value;
1028 } 1030 }
1029 1031
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1418 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1417 #if defined(OS_WIN) 1419 #if defined(OS_WIN)
1418 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1420 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1419 #endif 1421 #endif
1420 complete_gpu_info_already_requested_ = true; 1422 complete_gpu_info_already_requested_ = true;
1421 // Some observers might be waiting. 1423 // Some observers might be waiting.
1422 NotifyGpuInfoUpdate(); 1424 NotifyGpuInfoUpdate();
1423 } 1425 }
1424 1426
1425 } // namespace content 1427 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | content/browser/gpu/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698