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

Side by Side Diff: base/trace_event/memory_dump_manager.cc

Issue 2258713003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 | « base/test/test_reg_util_win.cc ('k') | base/trace_event/process_memory_dump.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/trace_event/memory_dump_manager.h" 5 #include "base/trace_event/memory_dump_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/allocator/features.h" 10 #include "base/allocator/features.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // and type IDs. 665 // and type IDs.
666 session_state->SetStackFrameDeduplicator( 666 session_state->SetStackFrameDeduplicator(
667 WrapUnique(new StackFrameDeduplicator)); 667 WrapUnique(new StackFrameDeduplicator));
668 668
669 session_state->SetTypeNameDeduplicator( 669 session_state->SetTypeNameDeduplicator(
670 WrapUnique(new TypeNameDeduplicator)); 670 WrapUnique(new TypeNameDeduplicator));
671 671
672 TRACE_EVENT_API_ADD_METADATA_EVENT( 672 TRACE_EVENT_API_ADD_METADATA_EVENT(
673 TraceLog::GetCategoryGroupEnabled("__metadata"), "stackFrames", 673 TraceLog::GetCategoryGroupEnabled("__metadata"), "stackFrames",
674 "stackFrames", 674 "stackFrames",
675 WrapUnique(new SessionStateConvertableProxy<StackFrameDeduplicator>( 675 MakeUnique<SessionStateConvertableProxy<StackFrameDeduplicator>>(
676 session_state, &MemoryDumpSessionState::stack_frame_deduplicator))); 676 session_state, &MemoryDumpSessionState::stack_frame_deduplicator));
677 677
678 TRACE_EVENT_API_ADD_METADATA_EVENT( 678 TRACE_EVENT_API_ADD_METADATA_EVENT(
679 TraceLog::GetCategoryGroupEnabled("__metadata"), "typeNames", 679 TraceLog::GetCategoryGroupEnabled("__metadata"), "typeNames",
680 "typeNames", 680 "typeNames",
681 WrapUnique(new SessionStateConvertableProxy<TypeNameDeduplicator>( 681 MakeUnique<SessionStateConvertableProxy<TypeNameDeduplicator>>(
682 session_state, &MemoryDumpSessionState::type_name_deduplicator))); 682 session_state, &MemoryDumpSessionState::type_name_deduplicator));
683 } 683 }
684 684
685 { 685 {
686 AutoLock lock(lock_); 686 AutoLock lock(lock_);
687 687
688 DCHECK(delegate_); // At this point we must have a delegate. 688 DCHECK(delegate_); // At this point we must have a delegate.
689 session_state_ = session_state; 689 session_state_ = session_state;
690 690
691 DCHECK(!dump_thread_); 691 DCHECK(!dump_thread_);
692 dump_thread_ = std::move(dump_thread); 692 dump_thread_ = std::move(dump_thread);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 if (heavy_dump_rate_ > 0 && periodic_dumps_count_ % heavy_dump_rate_ == 0) 865 if (heavy_dump_rate_ > 0 && periodic_dumps_count_ % heavy_dump_rate_ == 0)
866 level_of_detail = MemoryDumpLevelOfDetail::DETAILED; 866 level_of_detail = MemoryDumpLevelOfDetail::DETAILED;
867 ++periodic_dumps_count_; 867 ++periodic_dumps_count_;
868 868
869 MemoryDumpManager::GetInstance()->RequestGlobalDump( 869 MemoryDumpManager::GetInstance()->RequestGlobalDump(
870 MemoryDumpType::PERIODIC_INTERVAL, level_of_detail); 870 MemoryDumpType::PERIODIC_INTERVAL, level_of_detail);
871 } 871 }
872 872
873 } // namespace trace_event 873 } // namespace trace_event
874 } // namespace base 874 } // namespace base
OLDNEW
« no previous file with comments | « base/test/test_reg_util_win.cc ('k') | base/trace_event/process_memory_dump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698