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

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

Issue 1995573003: [tracing] Introduce BACKGROUND mode in MemoryInfra (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use nullptr to mark end. Created 4 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 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_request_args.h" 5 #include "base/trace_event/memory_dump_request_args.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace base { 9 namespace base {
10 namespace trace_event { 10 namespace trace_event {
(...skipping 10 matching lines...) Expand all
21 case MemoryDumpType::EXPLICITLY_TRIGGERED: 21 case MemoryDumpType::EXPLICITLY_TRIGGERED:
22 return "explicitly_triggered"; 22 return "explicitly_triggered";
23 } 23 }
24 NOTREACHED(); 24 NOTREACHED();
25 return "unknown"; 25 return "unknown";
26 } 26 }
27 27
28 const char* MemoryDumpLevelOfDetailToString( 28 const char* MemoryDumpLevelOfDetailToString(
29 const MemoryDumpLevelOfDetail& level_of_detail) { 29 const MemoryDumpLevelOfDetail& level_of_detail) {
30 switch (level_of_detail) { 30 switch (level_of_detail) {
31 case MemoryDumpLevelOfDetail::BACKGROUND:
32 return "background";
31 case MemoryDumpLevelOfDetail::LIGHT: 33 case MemoryDumpLevelOfDetail::LIGHT:
32 return "light"; 34 return "light";
33 case MemoryDumpLevelOfDetail::DETAILED: 35 case MemoryDumpLevelOfDetail::DETAILED:
34 return "detailed"; 36 return "detailed";
35 } 37 }
36 NOTREACHED(); 38 NOTREACHED();
37 return "unknown"; 39 return "unknown";
38 } 40 }
39 41
40 MemoryDumpLevelOfDetail StringToMemoryDumpLevelOfDetail( 42 MemoryDumpLevelOfDetail StringToMemoryDumpLevelOfDetail(
41 const std::string& str) { 43 const std::string& str) {
44 if (str == "background")
45 return MemoryDumpLevelOfDetail::BACKGROUND;
42 if (str == "light") 46 if (str == "light")
43 return MemoryDumpLevelOfDetail::LIGHT; 47 return MemoryDumpLevelOfDetail::LIGHT;
44 if (str == "detailed") 48 if (str == "detailed")
45 return MemoryDumpLevelOfDetail::DETAILED; 49 return MemoryDumpLevelOfDetail::DETAILED;
46 NOTREACHED(); 50 NOTREACHED();
47 return MemoryDumpLevelOfDetail::LAST; 51 return MemoryDumpLevelOfDetail::LAST;
48 } 52 }
49 53
50 } // namespace trace_event 54 } // namespace trace_event
51 } // namespace base 55 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_request_args.h ('k') | base/trace_event/trace_config_memory_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698