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

Unified Diff: base/win/wrapped_window_proc.h

Issue 2881943002: Make window message processing tally in the task profiler. (Closed)
Patch Set: Address Greg's comment. Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/wrapped_window_proc.h
diff --git a/base/win/wrapped_window_proc.h b/base/win/wrapped_window_proc.h
index d464a9c279fe4b3618a22a9c3b5625735fc67fdf..80ec345e46419d36b82588691b51cfa1dd391292 100644
--- a/base/win/wrapped_window_proc.h
+++ b/base/win/wrapped_window_proc.h
@@ -13,6 +13,7 @@
#include <windows.h>
#include "base/base_export.h"
+#include "base/profiler/scoped_profile.h"
#include "base/strings/string16.h"
namespace base {
@@ -69,10 +70,13 @@ BASE_EXPORT void InitializeWindowClass(
// CreateWindowW(class_name, window_name, ...
//
template <WNDPROC proc>
-LRESULT CALLBACK WrappedWindowProc(HWND hwnd, UINT message,
- WPARAM wparam, LPARAM lparam) {
+LRESULT CALLBACK
+WrappedWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
LRESULT rv = 0;
__try {
+ tracked_objects::ScopedProfile scoped_profile(
+ FROM_HERE, tracked_objects::ScopedProfile::ENABLED);
+
rv = proc(hwnd, message, wparam, lparam);
} __except(CallExceptionFilter(GetExceptionInformation())) {
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698