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

Unified Diff: chrome/browser/ui/browser_browsertest.cc

Issue 1160073004: chrome/browser/ui: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 5 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 | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_focus_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index da40c2163e5bc291e83db2b6df07fa15c06cc2d7..73ae3e2e1446401fadebc506a17095c46c4f383d 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -8,7 +8,9 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
+#include "base/location.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/sys_info.h"
@@ -204,7 +206,7 @@ void CloseWindowCallback(Browser* browser) {
// menu.
void RunCloseWithAppMenuCallback(Browser* browser) {
// ShowAppMenu is modal under views. Schedule a task that closes the window.
- base::MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->task_runner()->PostTask(
FROM_HERE, base::Bind(&CloseWindowCallback, browser));
chrome::ShowAppMenu(browser);
}
@@ -918,8 +920,8 @@ class BeforeUnloadAtQuitWithTwoWindows : public InProcessBrowserTest {
// Run the application event loop to completion, which will cycle the
// native MessagePump on all platforms.
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->task_runner()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
base::MessageLoop::current()->Run();
// Take care of any remaining Cocoa work.
@@ -1591,7 +1593,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CloseWithAppMenuOpen) {
return;
// We need a message loop running for menus on windows.
- base::MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->task_runner()->PostTask(
FROM_HERE, base::Bind(&RunCloseWithAppMenuCallback, browser()));
}
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698