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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 bool TracingControllerImpl::IsCoordinatorProcess() const { | 849 bool TracingControllerImpl::IsCoordinatorProcess() const { |
850 return true; | 850 return true; |
851 } | 851 } |
852 | 852 |
853 uint64 TracingControllerImpl::GetTracingProcessId() const { | 853 uint64 TracingControllerImpl::GetTracingProcessId() const { |
854 return ChildProcessHost::kBrowserTracingProcessId; | 854 return ChildProcessHost::kBrowserTracingProcessId; |
855 } | 855 } |
856 | 856 |
857 void TracingControllerImpl::AddTraceMessageFilterObserver( | 857 void TracingControllerImpl::AddTraceMessageFilterObserver( |
858 TraceMessageFilterObserver* observer) { | 858 TraceMessageFilterObserver* observer) { |
859 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 859 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
860 trace_message_filter_observers_.AddObserver(observer); | 860 trace_message_filter_observers_.AddObserver(observer); |
861 | 861 |
862 for (auto& filter : trace_message_filters_) | 862 for (auto& filter : trace_message_filters_) |
863 observer->OnTraceMessageFilterAdded(filter.get()); | 863 observer->OnTraceMessageFilterAdded(filter.get()); |
864 } | 864 } |
865 | 865 |
866 void TracingControllerImpl::RemoveTraceMessageFilterObserver( | 866 void TracingControllerImpl::RemoveTraceMessageFilterObserver( |
867 TraceMessageFilterObserver* observer) { | 867 TraceMessageFilterObserver* observer) { |
868 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 868 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
869 trace_message_filter_observers_.RemoveObserver(observer); | 869 trace_message_filter_observers_.RemoveObserver(observer); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 is_monitoring_ = is_monitoring; | 938 is_monitoring_ = is_monitoring; |
939 #if !defined(OS_ANDROID) | 939 #if !defined(OS_ANDROID) |
940 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); | 940 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); |
941 it != tracing_uis_.end(); it++) { | 941 it != tracing_uis_.end(); it++) { |
942 (*it)->OnMonitoringStateChanged(is_monitoring); | 942 (*it)->OnMonitoringStateChanged(is_monitoring); |
943 } | 943 } |
944 #endif | 944 #endif |
945 } | 945 } |
946 | 946 |
947 } // namespace content | 947 } // namespace content |
OLD | NEW |