Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: content/browser/profiler_controller_impl.cc

Issue 985773002: Introducing phased profiling framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write_to_file
Patch Set: Fixing Android compile errors. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/profiler_controller_impl.h ('k') | content/browser/profiler_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/process/process_handle.h" 8 #include "base/process/process_handle.h"
9 #include "base/tracked_objects.h" 9 #include "base/tracked_objects.h"
10 #include "content/common/child_process_messages.h" 10 #include "content/common/child_process_messages.h"
(...skipping 23 matching lines...) Expand all
34 int pending_processes, 34 int pending_processes,
35 bool end) { 35 bool end) {
36 DCHECK_CURRENTLY_ON(BrowserThread::UI); 36 DCHECK_CURRENTLY_ON(BrowserThread::UI);
37 if (subscriber_) 37 if (subscriber_)
38 subscriber_->OnPendingProcesses(sequence_number, pending_processes, end); 38 subscriber_->OnPendingProcesses(sequence_number, pending_processes, end);
39 } 39 }
40 40
41 void ProfilerControllerImpl::OnProfilerDataCollected( 41 void ProfilerControllerImpl::OnProfilerDataCollected(
42 int sequence_number, 42 int sequence_number,
43 const tracked_objects::ProcessDataSnapshot& profiler_data, 43 const tracked_objects::ProcessDataSnapshot& profiler_data,
44 int process_type) { 44 content::ProcessType process_type) {
45 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { 45 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
46 BrowserThread::PostTask( 46 BrowserThread::PostTask(
47 BrowserThread::UI, FROM_HERE, 47 BrowserThread::UI, FROM_HERE,
48 base::Bind(&ProfilerControllerImpl::OnProfilerDataCollected, 48 base::Bind(&ProfilerControllerImpl::OnProfilerDataCollected,
49 base::Unretained(this), 49 base::Unretained(this),
50 sequence_number, 50 sequence_number,
51 profiler_data, 51 profiler_data,
52 process_type)); 52 process_type));
53 return; 53 return;
54 } 54 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 BrowserThread::PostTask( 117 BrowserThread::PostTask(
118 BrowserThread::IO, 118 BrowserThread::IO,
119 FROM_HERE, 119 FROM_HERE,
120 base::Bind(&ProfilerControllerImpl::GetProfilerDataFromChildProcesses, 120 base::Bind(&ProfilerControllerImpl::GetProfilerDataFromChildProcesses,
121 base::Unretained(this), 121 base::Unretained(this),
122 sequence_number)); 122 sequence_number));
123 } 123 }
124 124
125 } // namespace content 125 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/profiler_controller_impl.h ('k') | content/browser/profiler_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698