| 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/histogram_controller.h" | 5 #include "content/browser/histogram_controller.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/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "content/browser/histogram_subscriber.h" | 10 #include "content/browser/histogram_subscriber.h" |
| 11 #include "content/common/child_process_messages.h" | 11 #include "content/common/child_process_messages.h" |
| 12 #include "content/public/browser/browser_child_process_host_iterator.h" | 12 #include "content/public/browser/browser_child_process_host_iterator.h" |
| 13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "content/public/browser/child_process_data.h" | 14 #include "content/public/browser/child_process_data.h" |
| 15 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
| 16 #include "content/public/common/process_type.h" | 16 #include "content/public/common/process_type.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 HistogramController* HistogramController::GetInstance() { | 20 HistogramController* HistogramController::GetInstance() { |
| 21 return Singleton<HistogramController>::get(); | 21 return base::Singleton<HistogramController>::get(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 HistogramController::HistogramController() : subscriber_(NULL) { | 24 HistogramController::HistogramController() : subscriber_(NULL) { |
| 25 } | 25 } |
| 26 | 26 |
| 27 HistogramController::~HistogramController() { | 27 HistogramController::~HistogramController() { |
| 28 } | 28 } |
| 29 | 29 |
| 30 void HistogramController::OnPendingProcesses(int sequence_number, | 30 void HistogramController::OnPendingProcesses(int sequence_number, |
| 31 int pending_processes, | 31 int pending_processes, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 BrowserThread::PostTask( | 122 BrowserThread::PostTask( |
| 123 BrowserThread::IO, | 123 BrowserThread::IO, |
| 124 FROM_HERE, | 124 FROM_HERE, |
| 125 base::Bind(&HistogramController::GetHistogramDataFromChildProcesses, | 125 base::Bind(&HistogramController::GetHistogramDataFromChildProcesses, |
| 126 base::Unretained(this), | 126 base::Unretained(this), |
| 127 sequence_number)); | 127 sequence_number)); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace content | 130 } // namespace content |
| OLD | NEW |