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

Unified Diff: content/renderer/pepper/plugin_power_saver_helper.cc

Issue 2034663003: Remove use of deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « content/renderer/pepper/pepper_webplugin_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/plugin_power_saver_helper.cc
diff --git a/content/renderer/pepper/plugin_power_saver_helper.cc b/content/renderer/pepper/plugin_power_saver_helper.cc
index 36d65e3f8fc7f2f945c2931f712e6c3191c13e9e..6631a20cd936ce6ea7452ae8571fa28922b43a40 100644
--- a/content/renderer/pepper/plugin_power_saver_helper.cc
+++ b/content/renderer/pepper/plugin_power_saver_helper.cc
@@ -7,9 +7,11 @@
#include <string>
#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
#include "base/metrics/histogram.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "content/common/frame_messages.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/render_frame.h"
@@ -76,8 +78,8 @@ void PluginPowerSaverHelper::OnUpdatePluginContentOriginWhitelist(
if (origin_whitelist.count(it->content_origin)) {
// Because the unthrottle callback may register another peripheral plugin
// and invalidate our iterator, we cannot run it synchronously.
- base::MessageLoop::current()->PostTask(FROM_HERE,
- it->unthrottle_callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ it->unthrottle_callback);
it = peripheral_plugins_.erase(it);
} else {
++it;
« no previous file with comments | « content/renderer/pepper/pepper_webplugin_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698