OLD | NEW |
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 Loading... |
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 |
OLD | NEW |