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/common/profiling.h" | 5 #include "chrome/common/profiling.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/base_switches.h" |
8 #include "base/bind.h" | 9 #include "base/bind.h" |
9 #include "base/command_line.h" | 10 #include "base/command_line.h" |
10 #include "base/debug/profiler.h" | 11 #include "base/debug/profiler.h" |
11 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
12 #include "base/location.h" | 13 #include "base/location.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
16 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
17 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 return base::debug::BeingProfiled(); | 193 return base::debug::BeingProfiled(); |
193 } | 194 } |
194 | 195 |
195 // static | 196 // static |
196 void Profiling::Toggle() { | 197 void Profiling::Toggle() { |
197 if (BeingProfiled()) | 198 if (BeingProfiled()) |
198 Stop(); | 199 Stop(); |
199 else | 200 else |
200 Start(); | 201 Start(); |
201 } | 202 } |
OLD | NEW |