| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "content/browser/tracing/tracing_controller_impl.h" | 4 #include "content/browser/tracing/tracing_controller_impl.h" |
| 5 | 5 |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/json/string_escape.h" | 8 #include "base/json/string_escape.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 pending_memory_dump_ack_count_(0), | 50 pending_memory_dump_ack_count_(0), |
| 51 failed_memory_dump_count_(0), | 51 failed_memory_dump_count_(0), |
| 52 // Tracing may have been enabled by ContentMainRunner if kTraceStartup | 52 // Tracing may have been enabled by ContentMainRunner if kTraceStartup |
| 53 // is specified in command line. | 53 // is specified in command line. |
| 54 #if defined(OS_CHROMEOS) || defined(OS_WIN) | 54 #if defined(OS_CHROMEOS) || defined(OS_WIN) |
| 55 is_system_tracing_(false), | 55 is_system_tracing_(false), |
| 56 #endif | 56 #endif |
| 57 is_recording_(TraceLog::GetInstance()->IsEnabled()), | 57 is_recording_(TraceLog::GetInstance()->IsEnabled()), |
| 58 is_monitoring_(false) { | 58 is_monitoring_(false) { |
| 59 base::trace_event::MemoryDumpManager::GetInstance()->SetDelegate(this); | 59 base::trace_event::MemoryDumpManager::GetInstance()->SetDelegate(this); |
| 60 base::FileTracing::g_provider = &file_tracing_provider_; |
| 60 } | 61 } |
| 61 | 62 |
| 62 TracingControllerImpl::~TracingControllerImpl() { | 63 TracingControllerImpl::~TracingControllerImpl() { |
| 63 // This is a Leaky instance. | 64 // This is a Leaky instance. |
| 64 NOTREACHED(); | 65 NOTREACHED(); |
| 65 } | 66 } |
| 66 | 67 |
| 67 TracingControllerImpl* TracingControllerImpl::GetInstance() { | 68 TracingControllerImpl* TracingControllerImpl::GetInstance() { |
| 68 return g_controller.Pointer(); | 69 return g_controller.Pointer(); |
| 69 } | 70 } |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 is_monitoring_ = is_monitoring; | 871 is_monitoring_ = is_monitoring; |
| 871 #if !defined(OS_ANDROID) | 872 #if !defined(OS_ANDROID) |
| 872 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); | 873 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); |
| 873 it != tracing_uis_.end(); it++) { | 874 it != tracing_uis_.end(); it++) { |
| 874 (*it)->OnMonitoringStateChanged(is_monitoring); | 875 (*it)->OnMonitoringStateChanged(is_monitoring); |
| 875 } | 876 } |
| 876 #endif | 877 #endif |
| 877 } | 878 } |
| 878 | 879 |
| 879 } // namespace content | 880 } // namespace content |
| OLD | NEW |