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

Unified Diff: chrome/browser/task_management/sampling/task_manager_io_thread_helper.h

Issue 1918423002: Fix TaskmanagerIoThreadHelper bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | chrome/browser/task_management/sampling/task_manager_io_thread_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_management/sampling/task_manager_io_thread_helper.h
diff --git a/chrome/browser/task_management/sampling/task_manager_io_thread_helper.h b/chrome/browser/task_management/sampling/task_manager_io_thread_helper.h
index ba301b2e8d62712d7d78f8d23aa3c8d1eb658dd7..6cdbb4c64d4e41ade94fed30a439fa9e96702a1f 100644
--- a/chrome/browser/task_management/sampling/task_manager_io_thread_helper.h
+++ b/chrome/browser/task_management/sampling/task_manager_io_thread_helper.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
namespace net {
class URLRequest;
@@ -78,7 +79,7 @@ class TaskManagerIoThreadHelper {
// We gather multiple notifications on the IO thread in one second before a
// call is made to the following function to start the processing.
- static void OnMultipleBytesReadIO();
+ void OnMultipleBytesReadIO();
// This will update the task manager with the network bytes read.
void OnNetworkBytesRead(const net::URLRequest& request, int64_t bytes_read);
@@ -87,6 +88,8 @@ class TaskManagerIoThreadHelper {
// of bytes read from URLRequests.
std::vector<BytesReadParam> bytes_read_buffer_;
+ base::WeakPtrFactory<TaskManagerIoThreadHelper> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(TaskManagerIoThreadHelper);
};
« no previous file with comments | « no previous file | chrome/browser/task_management/sampling/task_manager_io_thread_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698