OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |