OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/task_profiler/task_profiler_data_serializer.h" | 5 #include "chrome/browser/task_profiler/task_profiler_data_serializer.h" |
6 | 6 |
7 #include "base/file_util.h" | |
8 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "base/tracked_objects.h" | 11 #include "base/tracked_objects.h" |
12 #include "chrome/common/chrome_content_client.h" | 12 #include "chrome/common/chrome_content_client.h" |
13 #include "content/public/common/process_type.h" | 13 #include "content/public/common/process_type.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 using base::DictionaryValue; | 16 using base::DictionaryValue; |
17 using base::ListValue; | 17 using base::ListValue; |
18 using base::Value; | 18 using base::Value; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 snapshot_list->Append(shutdown_snapshot); | 143 snapshot_list->Append(shutdown_snapshot); |
144 root->Set("snapshots", snapshot_list); | 144 root->Set("snapshots", snapshot_list); |
145 | 145 |
146 serializer.Serialize(*root); | 146 serializer.Serialize(*root); |
147 int data_size = static_cast<int>(output.size()); | 147 int data_size = static_cast<int>(output.size()); |
148 | 148 |
149 return data_size == base::WriteFile(path, output.data(), data_size); | 149 return data_size == base::WriteFile(path, output.data(), data_size); |
150 } | 150 } |
151 | 151 |
152 } // namespace task_profiler | 152 } // namespace task_profiler |
OLD | NEW |