diff options
author | ssid <ssid@chromium.org> | 2015-08-07 12:16:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-07 19:17:16 +0000 |
commit | 297cae0bc0f633a600bc36c09097540a2c03d7f9 (patch) | |
tree | 51b4e97f0e7dd98a4982224d46a9c11bcd1fe239 /base | |
parent | bbe9cfdf0feedae4392ccbc16f2784ab527bd466 (diff) | |
download | chromium_src-297cae0bc0f633a600bc36c09097540a2c03d7f9.zip chromium_src-297cae0bc0f633a600bc36c09097540a2c03d7f9.tar.gz chromium_src-297cae0bc0f633a600bc36c09097540a2c03d7f9.tar.bz2 |
[tracing] Mechanical rename of LevelOfDetail enum to enum class.
This CL changes the LevelOfDetail enum to enum class to make it easier
to read the code.
TBR=jochen@chromium.org
BUG=499731
Review URL: https://codereview.chromium.org/1273413002
Cr-Commit-Position: refs/heads/master@{#342404}
Diffstat (limited to 'base')
8 files changed, 8 insertions, 9 deletions
diff --git a/base/trace_event/java_heap_dump_provider_android_unittest.cc b/base/trace_event/java_heap_dump_provider_android_unittest.cc index bf656ee..557ac45 100644 --- a/base/trace_event/java_heap_dump_provider_android_unittest.cc +++ b/base/trace_event/java_heap_dump_provider_android_unittest.cc @@ -13,7 +13,7 @@ namespace trace_event { TEST(JavaHeapDumpProviderTest, JavaHeapDump) { auto jhdp = JavaHeapDumpProvider::GetInstance(); scoped_ptr<ProcessMemoryDump> pmd(new ProcessMemoryDump(nullptr)); - MemoryDumpArgs dump_args = {MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; + MemoryDumpArgs dump_args = {MemoryDumpArgs::LevelOfDetail::HIGH}; jhdp->OnMemoryDump(dump_args, pmd.get()); } diff --git a/base/trace_event/memory_allocator_dump_unittest.cc b/base/trace_event/memory_allocator_dump_unittest.cc index 0c14173..8a41513 100644 --- a/base/trace_event/memory_allocator_dump_unittest.cc +++ b/base/trace_event/memory_allocator_dump_unittest.cc @@ -126,7 +126,7 @@ TEST(MemoryAllocatorDumpTest, GuidGeneration) { TEST(MemoryAllocatorDumpTest, DumpIntoProcessMemoryDump) { FakeMemoryAllocatorDumpProvider fmadp; ProcessMemoryDump pmd(make_scoped_refptr(new MemoryDumpSessionState())); - MemoryDumpArgs dump_args = {MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; + MemoryDumpArgs dump_args = {MemoryDumpArgs::LevelOfDetail::HIGH}; fmadp.OnMemoryDump(dump_args, &pmd); diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc index f9ba3ae..f5e2a4a 100644 --- a/base/trace_event/memory_dump_manager.cc +++ b/base/trace_event/memory_dump_manager.cc @@ -316,7 +316,7 @@ void MemoryDumpManager::ContinueAsyncProcessDump( // MemoryDumpType to get request for light / heavy dump, and remove this // constant. if (!skip_dump) { - MemoryDumpArgs dump_args = {MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; + MemoryDumpArgs dump_args = {MemoryDumpArgs::LevelOfDetail::HIGH}; dump_successful = mdp->OnMemoryDump(dump_args, &pmd_async_state->process_memory_dump); } diff --git a/base/trace_event/memory_dump_provider.h b/base/trace_event/memory_dump_provider.h index 9fefdec..02c2c73 100644 --- a/base/trace_event/memory_dump_provider.h +++ b/base/trace_event/memory_dump_provider.h @@ -17,7 +17,7 @@ class ProcessMemoryDump; // should generate on dump request. This is to control the size of dumps // generated. struct MemoryDumpArgs { - enum LevelOfDetail { LEVEL_OF_DETAIL_LOW, LEVEL_OF_DETAIL_HIGH }; + enum class LevelOfDetail { LOW, HIGH }; LevelOfDetail level_of_detail; }; diff --git a/base/trace_event/process_memory_maps_dump_provider.cc b/base/trace_event/process_memory_maps_dump_provider.cc index 750ca11..2dcdd37 100644 --- a/base/trace_event/process_memory_maps_dump_provider.cc +++ b/base/trace_event/process_memory_maps_dump_provider.cc @@ -168,7 +168,7 @@ ProcessMemoryMapsDumpProvider::~ProcessMemoryMapsDumpProvider() { bool ProcessMemoryMapsDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, ProcessMemoryDump* pmd) { // Snapshot of memory maps is not taken for light dump requests. - if (args.level_of_detail == MemoryDumpArgs::LEVEL_OF_DETAIL_LOW) + if (args.level_of_detail == MemoryDumpArgs::LevelOfDetail::LOW) return true; uint32 res = 0; diff --git a/base/trace_event/process_memory_maps_dump_provider_unittest.cc b/base/trace_event/process_memory_maps_dump_provider_unittest.cc index fcb9eaf..f951a09 100644 --- a/base/trace_event/process_memory_maps_dump_provider_unittest.cc +++ b/base/trace_event/process_memory_maps_dump_provider_unittest.cc @@ -110,7 +110,7 @@ TEST(ProcessMemoryMapsDumpProviderTest, ParseProcSmaps) { const uint32 kProtR = ProcessMemoryMaps::VMRegion::kProtectionFlagsRead; const uint32 kProtW = ProcessMemoryMaps::VMRegion::kProtectionFlagsWrite; const uint32 kProtX = ProcessMemoryMaps::VMRegion::kProtectionFlagsExec; - const MemoryDumpArgs dump_args = {MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; + const MemoryDumpArgs dump_args = {MemoryDumpArgs::LevelOfDetail::HIGH}; auto pmmdp = ProcessMemoryMapsDumpProvider::GetInstance(); diff --git a/base/trace_event/process_memory_totals_dump_provider_unittest.cc b/base/trace_event/process_memory_totals_dump_provider_unittest.cc index f32a322c..015cb2d 100644 --- a/base/trace_event/process_memory_totals_dump_provider_unittest.cc +++ b/base/trace_event/process_memory_totals_dump_provider_unittest.cc @@ -12,8 +12,7 @@ namespace base { namespace trace_event { TEST(ProcessMemoryTotalsDumpProviderTest, DumpRSS) { - const MemoryDumpArgs high_detail_args = { - MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; + const MemoryDumpArgs high_detail_args = {MemoryDumpArgs::LevelOfDetail::HIGH}; auto pmtdp = ProcessMemoryTotalsDumpProvider::GetInstance(); scoped_ptr<ProcessMemoryDump> pmd_before(new ProcessMemoryDump(nullptr)); scoped_ptr<ProcessMemoryDump> pmd_after(new ProcessMemoryDump(nullptr)); diff --git a/base/trace_event/winheap_dump_provider_win_unittest.cc b/base/trace_event/winheap_dump_provider_win_unittest.cc index 7629915..93ae299 100644 --- a/base/trace_event/winheap_dump_provider_win_unittest.cc +++ b/base/trace_event/winheap_dump_provider_win_unittest.cc @@ -15,7 +15,7 @@ namespace trace_event { TEST(WinHeapDumpProviderTest, OnMemoryDump) { ProcessMemoryDump pmd(make_scoped_refptr(new MemoryDumpSessionState())); - MemoryDumpArgs dump_args = {MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; + MemoryDumpArgs dump_args = {MemoryDumpArgs::LevelOfDetail::HIGH}; WinHeapDumpProvider* winheap_dump_provider = WinHeapDumpProvider::GetInstance(); |