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 "chrome/browser/caps/generate_state_json.h" | 5 #include "chrome/browser/caps/generate_state_json.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/cpu.h" | 15 #include "base/cpu.h" |
16 #include "base/files/file.h" | 16 #include "base/files/file.h" |
17 #include "base/json/json_writer.h" | 17 #include "base/json/json_writer.h" |
18 #include "base/location.h" | 18 #include "base/location.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/single_thread_task_runner.h" | 20 #include "base/single_thread_task_runner.h" |
21 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
22 #include "base/sys_info.h" | 22 #include "base/sys_info.h" |
23 #include "base/thread_task_runner_handle.h" | |
24 #include "base/threading/thread_restrictions.h" | 23 #include "base/threading/thread_restrictions.h" |
| 24 #include "base/threading/thread_task_runner_handle.h" |
25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
26 #include "base/values.h" | 26 #include "base/values.h" |
27 #include "build/build_config.h" | 27 #include "build/build_config.h" |
28 #include "chrome/browser/task_manager/task_manager.h" | 28 #include "chrome/browser/task_manager/task_manager.h" |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 std::string Key(base::ProcessId pid, const char* category) { | 32 std::string Key(base::ProcessId pid, const char* category) { |
33 return category ? | 33 return category ? |
34 base::StringPrintf("process.%d.%s", pid, category) : | 34 base::StringPrintf("process.%d.%s", pid, category) : |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } // namespace | 199 } // namespace |
200 | 200 |
201 namespace caps { | 201 namespace caps { |
202 | 202 |
203 void GenerateStateJSON( | 203 void GenerateStateJSON( |
204 scoped_refptr<TaskManagerModel> model, base::File file) { | 204 scoped_refptr<TaskManagerModel> model, base::File file) { |
205 new TaskManagerDataDumper(model, std::move(file)); | 205 new TaskManagerDataDumper(model, std::move(file)); |
206 } | 206 } |
207 | 207 |
208 } | 208 } |
OLD | NEW |