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

Unified Diff: content/renderer/devtools/v8_sampling_profiler.h

Issue 1967793004: Change base class of V8SamplingProfiler to AsyncEnabledStateObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address alph's comments Created 4 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 | content/renderer/devtools/v8_sampling_profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/devtools/v8_sampling_profiler.h
diff --git a/content/renderer/devtools/v8_sampling_profiler.h b/content/renderer/devtools/v8_sampling_profiler.h
index 7604f5a2feec49c1610fbb792e0567dc8f1d23a8..6de3a72ac7ca12843c970f2ceaeb43ce94e70c49 100644
--- a/content/renderer/devtools/v8_sampling_profiler.h
+++ b/content/renderer/devtools/v8_sampling_profiler.h
@@ -8,7 +8,6 @@
#include <memory>
#include "base/macros.h"
-#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "base/trace_event/trace_log.h"
#include "content/common/content_export.h"
@@ -21,7 +20,7 @@ class V8SamplingThread;
// The class monitors enablement of V8 CPU profiler and
// spawns a sampling thread when needed.
class CONTENT_EXPORT V8SamplingProfiler final
- : public base::trace_event::TraceLog::EnabledStateObserver {
+ : public base::trace_event::TraceLog::AsyncEnabledStateObserver {
public:
explicit V8SamplingProfiler(bool underTest = false);
~V8SamplingProfiler() override;
@@ -40,7 +39,7 @@ class CONTENT_EXPORT V8SamplingProfiler final
std::unique_ptr<base::WaitableEvent> waitable_event_for_testing_;
std::unique_ptr<V8SamplingThread> sampling_thread_;
std::unique_ptr<Sampler> render_thread_sampler_;
- scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ base::WeakPtrFactory<V8SamplingProfiler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(V8SamplingProfiler);
};
« no previous file with comments | « no previous file | content/renderer/devtools/v8_sampling_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698