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

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: Created 3 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 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 return; 1002 return;
1002 } 1003 }
1003 { 1004 {
1004 gpu_info_.process_crash_count = GpuProcessHost::gpu_crash_count(); 1005 gpu_info_.process_crash_count = GpuProcessHost::gpu_crash_count();
1005 GpuDataManagerImpl::UnlockedSession session(owner_); 1006 GpuDataManagerImpl::UnlockedSession session(owner_);
1006 observer_list_->Notify( 1007 observer_list_->Notify(
1007 FROM_HERE, &GpuDataManagerObserver::OnGpuProcessCrashed, exit_code); 1008 FROM_HERE, &GpuDataManagerObserver::OnGpuProcessCrashed, exit_code);
1008 } 1009 }
1009 } 1010 }
1010 1011
1011 base::ListValue* GpuDataManagerImplPrivate::GetLogMessages() const { 1012 std::unique_ptr<base::ListValue> GpuDataManagerImplPrivate::GetLogMessages()
1012 base::ListValue* value = new base::ListValue; 1013 const {
1014 auto value = base::MakeUnique<base::ListValue>();
1013 for (size_t ii = 0; ii < log_messages_.size(); ++ii) { 1015 for (size_t ii = 0; ii < log_messages_.size(); ++ii) {
1014 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 1016 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
1015 dict->SetInteger("level", log_messages_[ii].level); 1017 dict->SetInteger("level", log_messages_[ii].level);
1016 dict->SetString("header", log_messages_[ii].header); 1018 dict->SetString("header", log_messages_[ii].header);
1017 dict->SetString("message", log_messages_[ii].message); 1019 dict->SetString("message", log_messages_[ii].message);
1018 value->Append(std::move(dict)); 1020 value->Append(std::move(dict));
1019 } 1021 }
1020 return value; 1022 return value;
1021 } 1023 }
1022 1024
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1408 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1407 #if defined(OS_WIN) 1409 #if defined(OS_WIN)
1408 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1410 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1409 #endif 1411 #endif
1410 complete_gpu_info_already_requested_ = true; 1412 complete_gpu_info_already_requested_ = true;
1411 // Some observers might be waiting. 1413 // Some observers might be waiting.
1412 NotifyGpuInfoUpdate(); 1414 NotifyGpuInfoUpdate();
1413 } 1415 }
1414 1416
1415 } // namespace content 1417 } // 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