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

Unified Diff: chrome/browser/ui/ash/media_delegate_chromeos.cc

Issue 2375663002: Replace MessageLoop::current()->task_runner() with ThreadTaskRunnerHandle::Get(). (Closed)
Patch Set: rebase Created 4 years, 3 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
Index: chrome/browser/ui/ash/media_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/media_delegate_chromeos.cc b/chrome/browser/ui/ash/media_delegate_chromeos.cc
index 1c37e97029152785bbe39fdd7d4355bbcf2db631..eb98064c733761bd75e37eba4765534850c1378a 100644
--- a/chrome/browser/ui/ash/media_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/media_delegate_chromeos.cc
@@ -8,8 +8,10 @@
#include "ash/common/wm_shell.h"
#include "ash/content/shell_content_state.h"
#include "base/location.h"
+#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/extensions/media_player_api.h"
#include "chrome/browser/chromeos/extensions/media_player_event_router.h"
#include "chrome/browser/media/webrtc/media_stream_capture_indicator.h"
@@ -156,7 +158,8 @@ void MediaDelegateChromeOS::OnRequestUpdate(
int render_frame_id,
content::MediaStreamType stream_type,
const content::MediaRequestState state) {
- base::MessageLoopForUI::current()->task_runner()->PostTask(
+ DCHECK(base::MessageLoopForUI::IsCurrent());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&MediaDelegateChromeOS::NotifyMediaCaptureChange,
weak_ptr_factory_.GetWeakPtr()));
}
« no previous file with comments | « chrome/browser/chromeos/login/login_ui_keyboard_browsertest.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698