| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tracked_objects.h" | 5 #include "base/tracked_objects.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
| 12 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "base/port.h" | 14 #include "base/port.h" |
| 15 | 15 |
| 16 #include "base/win/dllmain.cc" | |
| 17 | |
| 18 using base::TimeDelta; | 16 using base::TimeDelta; |
| 19 | 17 |
| 20 namespace tracked_objects { | 18 namespace tracked_objects { |
| 21 | 19 |
| 22 namespace { | 20 namespace { |
| 23 // Flag to compile out almost all of the task tracking code. | 21 // Flag to compile out almost all of the task tracking code. |
| 24 static const bool kTrackAllTaskObjects = true; | 22 static const bool kTrackAllTaskObjects = true; |
| 25 | 23 |
| 26 // When ThreadData is first initialized, should we start in an ACTIVE state to | 24 // When ThreadData is first initialized, should we start in an ACTIVE state to |
| 27 // record all of the startup-time tasks, or should we start up DEACTIVATED, so | 25 // record all of the startup-time tasks, or should we start up DEACTIVATED, so |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 | 673 |
| 676 base::ListValue* DataCollector::ToValue() const { | 674 base::ListValue* DataCollector::ToValue() const { |
| 677 base::ListValue* list = new base::ListValue; | 675 base::ListValue* list = new base::ListValue; |
| 678 for (size_t i = 0; i < collection_.size(); ++i) { | 676 for (size_t i = 0; i < collection_.size(); ++i) { |
| 679 list->Append(collection_[i].ToValue()); | 677 list->Append(collection_[i].ToValue()); |
| 680 } | 678 } |
| 681 return list; | 679 return list; |
| 682 } | 680 } |
| 683 | 681 |
| 684 } // namespace tracked_objects | 682 } // namespace tracked_objects |
| OLD | NEW |