| 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/profiler_controller_impl.h" | 5 #include "content/browser/profiler_controller_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/tracked_objects.h" | 8 #include "base/tracked_objects.h" |
| 9 #include "content/common/child_process_messages.h" | 9 #include "content/common/child_process_messages.h" |
| 10 #include "content/public/browser/browser_child_process_host_iterator.h" | 10 #include "content/public/browser/browser_child_process_host_iterator.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 int pending_processes, | 33 int pending_processes, |
| 34 bool end) { | 34 bool end) { |
| 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 36 if (subscriber_) | 36 if (subscriber_) |
| 37 subscriber_->OnPendingProcesses(sequence_number, pending_processes, end); | 37 subscriber_->OnPendingProcesses(sequence_number, pending_processes, end); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void ProfilerControllerImpl::OnProfilerDataCollected( | 40 void ProfilerControllerImpl::OnProfilerDataCollected( |
| 41 int sequence_number, | 41 int sequence_number, |
| 42 const tracked_objects::ProcessDataSnapshot& profiler_data, | 42 const tracked_objects::ProcessDataSnapshot& profiler_data, |
| 43 ProcessType process_type) { | 43 int process_type) { |
| 44 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 44 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
| 45 BrowserThread::PostTask( | 45 BrowserThread::PostTask( |
| 46 BrowserThread::UI, FROM_HERE, | 46 BrowserThread::UI, FROM_HERE, |
| 47 base::Bind(&ProfilerControllerImpl::OnProfilerDataCollected, | 47 base::Bind(&ProfilerControllerImpl::OnProfilerDataCollected, |
| 48 base::Unretained(this), | 48 base::Unretained(this), |
| 49 sequence_number, | 49 sequence_number, |
| 50 profiler_data, | 50 profiler_data, |
| 51 process_type)); | 51 process_type)); |
| 52 return; | 52 return; |
| 53 } | 53 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 BrowserThread::PostTask( | 109 BrowserThread::PostTask( |
| 110 BrowserThread::IO, | 110 BrowserThread::IO, |
| 111 FROM_HERE, | 111 FROM_HERE, |
| 112 base::Bind(&ProfilerControllerImpl::GetProfilerDataFromChildProcesses, | 112 base::Bind(&ProfilerControllerImpl::GetProfilerDataFromChildProcesses, |
| 113 base::Unretained(this), | 113 base::Unretained(this), |
| 114 sequence_number)); | 114 sequence_number)); |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace content | 117 } // namespace content |
| OLD | NEW |