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

Unified Diff: content/common/child_thread.cc

Issue 9702014: [UMA] Use proper C++ objects to serialize tracked_objects across process boundaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix yet another IWYU for chromeos/ (take 4) Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/child_thread.h ('k') | content/public/browser/profiler_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_thread.cc
diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc
index c4061b3a8ab4e6b7a6c0ccd33e185031767e73f5..92773642517aa1782c7db0237f09ce4ffef257f5 100644
--- a/content/common/child_thread.cc
+++ b/content/common/child_thread.cc
@@ -7,7 +7,6 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/process.h"
-#include "base/process_util.h"
#include "base/string_util.h"
#include "base/tracked_objects.h"
#include "content/common/child_process.h"
@@ -28,6 +27,8 @@
#include "content/common/handle_enumerator_win.h"
#endif
+using tracked_objects::ThreadData;
+
ChildThread::ChildThread() {
channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessChannelID);
@@ -219,21 +220,16 @@ void ChildThread::OnSetIPCLoggingEnabled(bool enable) {
}
#endif // IPC_MESSAGE_LOG_ENABLED
-void ChildThread::OnSetProfilerStatus(
- tracked_objects::ThreadData::Status status) {
- tracked_objects::ThreadData::InitializeAndSetTrackingStatus(status);
+void ChildThread::OnSetProfilerStatus(ThreadData::Status status) {
+ ThreadData::InitializeAndSetTrackingStatus(status);
}
-void ChildThread::OnGetChildProfilerData(
- int sequence_number,
- const std::string& process_type) {
- scoped_ptr<base::DictionaryValue> value(
- tracked_objects::ThreadData::ToValue(false));
- value->SetString("process_type", process_type);
- value->SetInteger("process_id", base::GetCurrentProcId());
+void ChildThread::OnGetChildProfilerData(int sequence_number) {
+ tracked_objects::ProcessDataSnapshot process_data;
+ ThreadData::Snapshot(false, &process_data);
- Send(new ChildProcessHostMsg_ChildProfilerData(
- sequence_number, *value.get()));
+ Send(new ChildProcessHostMsg_ChildProfilerData(sequence_number,
+ process_data));
}
void ChildThread::OnDumpHandles() {
« no previous file with comments | « content/common/child_thread.h ('k') | content/public/browser/profiler_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698