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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/files/file_util.h" | |
11 #include "base/logging.h" | 10 #include "base/logging.h" |
12 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
13 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
14 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
15 #include "base/path_service.h" | 14 #include "base/path_service.h" |
16 #include "base/pending_task.h" | 15 #include "base/pending_task.h" |
17 #include "base/power_monitor/power_monitor.h" | 16 #include "base/power_monitor/power_monitor.h" |
18 #include "base/power_monitor/power_monitor_device_source.h" | 17 #include "base/power_monitor/power_monitor_device_source.h" |
19 #include "base/process/process_metrics.h" | 18 #include "base/process/process_metrics.h" |
20 #include "base/run_loop.h" | 19 #include "base/run_loop.h" |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 | 1189 |
1191 startup_trace_timer_.Start(FROM_HERE, | 1190 startup_trace_timer_.Start(FROM_HERE, |
1192 base::TimeDelta::FromSeconds(delay_secs), | 1191 base::TimeDelta::FromSeconds(delay_secs), |
1193 this, | 1192 this, |
1194 &BrowserMainLoop::EndStartupTracing); | 1193 &BrowserMainLoop::EndStartupTracing); |
1195 } | 1194 } |
1196 | 1195 |
1197 void BrowserMainLoop::EndStartupTracing() { | 1196 void BrowserMainLoop::EndStartupTracing() { |
1198 is_tracing_startup_ = false; | 1197 is_tracing_startup_ = false; |
1199 TracingController::GetInstance()->DisableRecording( | 1198 TracingController::GetInstance()->DisableRecording( |
1200 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); | 1199 TracingController::CreateFileSink( |
| 1200 startup_trace_file_, |
| 1201 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1201 } | 1202 } |
1202 | 1203 |
1203 } // namespace content | 1204 } // namespace content |
OLD | NEW |