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

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

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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/process/process_metrics_win.cc ('k') | chrome/app/close_handle_hook_win.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 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 10
10 #include "base/atomicops.h" 11 #include "base/atomicops.h"
11 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
12 #include "base/containers/scoped_ptr_map.h" 13 #include "base/containers/scoped_ptr_map.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/singleton.h" 15 #include "base/memory/singleton.h"
15 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
16 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
17 #include "base/trace_event/memory_dump_request_args.h" 18 #include "base/trace_event/memory_dump_request_args.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const char* system_allocator_pool_name() const { 118 const char* system_allocator_pool_name() const {
118 return kSystemAllocatorPoolName; 119 return kSystemAllocatorPoolName;
119 }; 120 };
120 121
121 // When set to true, calling |RegisterMemoryDumpProvider| is a no-op. 122 // When set to true, calling |RegisterMemoryDumpProvider| is a no-op.
122 void set_dumper_registrations_ignored_for_testing(bool ignored) { 123 void set_dumper_registrations_ignored_for_testing(bool ignored) {
123 dumper_registrations_ignored_for_testing_ = ignored; 124 dumper_registrations_ignored_for_testing_ = ignored;
124 } 125 }
125 126
126 private: 127 private:
127 friend struct DefaultDeleter<MemoryDumpManager>; // For the testing instance. 128 friend std::default_delete<MemoryDumpManager>; // For the testing instance.
128 friend struct DefaultSingletonTraits<MemoryDumpManager>; 129 friend struct DefaultSingletonTraits<MemoryDumpManager>;
129 friend class MemoryDumpManagerDelegate; 130 friend class MemoryDumpManagerDelegate;
130 friend class MemoryDumpManagerTest; 131 friend class MemoryDumpManagerTest;
131 132
132 // Descriptor struct used to hold information about registered MDPs. It is 133 // Descriptor struct used to hold information about registered MDPs. It is
133 // deliberately copyable, in order to allow it to be used as std::set value. 134 // deliberately copyable, in order to allow it to be used as std::set value.
134 struct MemoryDumpProviderInfo { 135 struct MemoryDumpProviderInfo {
135 MemoryDumpProviderInfo( 136 MemoryDumpProviderInfo(
136 MemoryDumpProvider* dump_provider, 137 MemoryDumpProvider* dump_provider,
137 const char* name, 138 const char* name,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 302 }
302 303
303 private: 304 private:
304 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); 305 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate);
305 }; 306 };
306 307
307 } // namespace trace_event 308 } // namespace trace_event
308 } // namespace base 309 } // namespace base
309 310
310 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 311 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
OLDNEW
« no previous file with comments | « base/process/process_metrics_win.cc ('k') | chrome/app/close_handle_hook_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698