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

Unified Diff: chrome/browser/ui/webui/profiler_ui.h

Issue 10077001: [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 in the chromeos/ code... 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
Index: chrome/browser/ui/webui/profiler_ui.h
diff --git a/chrome/browser/ui/webui/profiler_ui.h b/chrome/browser/ui/webui/profiler_ui.h
index 090fbd63bfac7f2dcfec3c089925bd4228127257..abb50e5126069f4e0fdf30c9b3790ad9f1b759bf 100644
--- a/chrome/browser/ui/webui/profiler_ui.h
+++ b/chrome/browser/ui/webui/profiler_ui.h
@@ -6,13 +6,13 @@
#define CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_
#pragma once
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/values.h"
+#include "chrome/browser/metrics/tracking_synchronizer_observer.h"
#include "content/public/browser/web_ui_controller.h"
// The C++ back-end for the chrome://profiler webui page.
-class ProfilerUI : public content::WebUIController {
+class ProfilerUI : public content::WebUIController,
+ public chrome_browser_metrics::TrackingSynchronizerObserver {
public:
explicit ProfilerUI(content::WebUI* web_ui);
virtual ~ProfilerUI();
@@ -20,13 +20,14 @@ class ProfilerUI : public content::WebUIController {
// Get the tracking data from TrackingSynchronizer.
void GetData();
- // Send the data to the renderer.
- void ReceivedData(base::Value* value);
-
private:
+ // TrackingSynchronizerObserver:
+ virtual void ReceivedProfilerData(
+ const tracked_objects::ProcessDataSnapshot& profiler_data,
+ content::ProcessType process_type) OVERRIDE;
+
// Used to get |weak_ptr_| to self on the UI thread.
- scoped_ptr<base::WeakPtrFactory<ProfilerUI> > ui_weak_ptr_factory_;
- base::WeakPtr<ProfilerUI> ui_weak_ptr_;
+ base::WeakPtrFactory<ProfilerUI> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ProfilerUI);
};
« no previous file with comments | « chrome/browser/task_profiler/task_profiler_data_serializer_unittest.cc ('k') | chrome/browser/ui/webui/profiler_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698