diff options
author | skyostil <skyostil@chromium.org> | 2015-05-27 08:40:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-27 15:41:28 +0000 |
commit | 2d3b5bd3338ffe8ceb6a9691fb7cd2a6388aba8a (patch) | |
tree | e9d6c041a19e9bd79066c92ff1d071ae6d0fccac /content/renderer/devtools | |
parent | 0fe6e09efc3b889bc740aeb175537929020f6754 (diff) | |
download | chromium_src-2d3b5bd3338ffe8ceb6a9691fb7cd2a6388aba8a.zip chromium_src-2d3b5bd3338ffe8ceb6a9691fb7cd2a6388aba8a.tar.gz chromium_src-2d3b5bd3338ffe8ceb6a9691fb7cd2a6388aba8a.tar.bz2 |
content/renderer: Remove use of MessageLoopProxy and deprecated MessageLoop APIs
This patch was mostly autogenerated with
https://codereview.chromium.org/1010073002/.
BUG=465354
Review URL: https://codereview.chromium.org/1144023007
Cr-Commit-Position: refs/heads/master@{#331576}
Diffstat (limited to 'content/renderer/devtools')
-rw-r--r-- | content/renderer/devtools/v8_sampling_profiler.cc | 10 | ||||
-rw-r--r-- | content/renderer/devtools/v8_sampling_profiler.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/content/renderer/devtools/v8_sampling_profiler.cc b/content/renderer/devtools/v8_sampling_profiler.cc index 20b2238..e70a5f5 100644 --- a/content/renderer/devtools/v8_sampling_profiler.cc +++ b/content/renderer/devtools/v8_sampling_profiler.cc @@ -14,8 +14,10 @@ #endif #include "base/format_macros.h" +#include "base/location.h" #include "base/strings/stringprintf.h" #include "base/synchronization/cancellation_flag.h" +#include "base/thread_task_runner_handle.h" #include "base/threading/platform_thread.h" #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event_argument.h" @@ -566,7 +568,7 @@ void V8SamplingThread::Stop() { V8SamplingProfiler::V8SamplingProfiler(bool underTest) : sampling_thread_(nullptr), render_thread_sampler_(Sampler::CreateForCurrentThread()), - message_loop_proxy_(base::MessageLoopProxy::current()) { + task_runner_(base::ThreadTaskRunnerHandle::Get()) { DCHECK(underTest || RenderThreadImpl::current()); // Force the "v8.cpu_profile" category to show up in the trace viewer. TraceLog::GetCategoryGroupEnabled( @@ -601,9 +603,9 @@ void V8SamplingProfiler::OnTraceLogEnabled() { if (record_mode == base::trace_event::TraceRecordMode::RECORD_CONTINUOUSLY) return; - message_loop_proxy_->PostTask( - FROM_HERE, base::Bind(&V8SamplingProfiler::StartSamplingThread, - base::Unretained(this))); + task_runner_->PostTask(FROM_HERE, + base::Bind(&V8SamplingProfiler::StartSamplingThread, + base::Unretained(this))); } void V8SamplingProfiler::OnTraceLogDisabled() { diff --git a/content/renderer/devtools/v8_sampling_profiler.h b/content/renderer/devtools/v8_sampling_profiler.h index 5b7d094..49ab310 100644 --- a/content/renderer/devtools/v8_sampling_profiler.h +++ b/content/renderer/devtools/v8_sampling_profiler.h @@ -5,6 +5,7 @@ #ifndef CONTENT_RENDERER_DEVTOOLS_V8_SAMPLING_PROFILER_H_ #define CONTENT_RENDERER_DEVTOOLS_V8_SAMPLING_PROFILER_H_ +#include "base/single_thread_task_runner.h" #include "base/synchronization/waitable_event.h" #include "base/trace_event/trace_event_impl.h" #include "content/common/content_export.h" @@ -35,7 +36,7 @@ class CONTENT_EXPORT V8SamplingProfiler final scoped_ptr<base::WaitableEvent> waitable_event_for_testing_; scoped_ptr<V8SamplingThread> sampling_thread_; scoped_ptr<Sampler> render_thread_sampler_; - scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; + scoped_refptr<base::SingleThreadTaskRunner> task_runner_; DISALLOW_COPY_AND_ASSIGN(V8SamplingProfiler); }; |