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

Side by Side Diff: chrome/browser/metrics/tracking_synchronizer.cc

Issue 8775061: Support incremental-max and sample in Profiler data (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | content/common/child_thread.cc » ('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) 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 "chrome/browser/metrics/tracking_synchronizer.h" 5 #include "chrome/browser/metrics/tracking_synchronizer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 RequestContext* request = 238 RequestContext* request =
239 RequestContext::Register(sequence_number, callback_object); 239 RequestContext::Register(sequence_number, callback_object);
240 240
241 // Increment pending process count for sending browser's profiler data. 241 // Increment pending process count for sending browser's profiler data.
242 request->IncrementProcessesPending(); 242 request->IncrementProcessesPending();
243 243
244 // Get profiler data from renderer and browser child processes. 244 // Get profiler data from renderer and browser child processes.
245 content::ProfilerController::GetInstance()->GetProfilerData(sequence_number); 245 content::ProfilerController::GetInstance()->GetProfilerData(sequence_number);
246 246
247 // Send profiler_data from browser process. 247 // Send profiler_data from browser process.
248 base::DictionaryValue* value = tracked_objects::ThreadData::ToValue(); 248 base::DictionaryValue* value = tracked_objects::ThreadData::ToValue(false);
249 const std::string process_type = 249 const std::string process_type =
250 content::GetProcessTypeNameInEnglish(content::PROCESS_TYPE_BROWSER); 250 content::GetProcessTypeNameInEnglish(content::PROCESS_TYPE_BROWSER);
251 value->SetString("process_type", process_type); 251 value->SetString("process_type", process_type);
252 value->SetInteger("process_id", base::GetCurrentProcId()); 252 value->SetInteger("process_id", base::GetCurrentProcId());
253 DecrementPendingProcessesAndSendData(sequence_number, value); 253 DecrementPendingProcessesAndSendData(sequence_number, value);
254 254
255 return sequence_number; 255 return sequence_number;
256 } 256 }
257 257
258 void TrackingSynchronizer::DecrementPendingProcessesAndSendData( 258 void TrackingSynchronizer::DecrementPendingProcessesAndSendData(
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 294 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
295 DCHECK(tracking_synchronizer_ != NULL); 295 DCHECK(tracking_synchronizer_ != NULL);
296 return tracking_synchronizer_; 296 return tracking_synchronizer_;
297 } 297 }
298 298
299 // static 299 // static
300 base::LazyInstance<RequestContext::RequestContextMap> 300 base::LazyInstance<RequestContext::RequestContextMap>
301 RequestContext::outstanding_requests_ = LAZY_INSTANCE_INITIALIZER; 301 RequestContext::outstanding_requests_ = LAZY_INSTANCE_INITIALIZER;
302 302
303 } // namespace chrome_browser_metrics 303 } // namespace chrome_browser_metrics
OLDNEW
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | content/common/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698