summaryrefslogtreecommitdiffstats
path: root/content/shell/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/shell/browser')
-rw-r--r--content/shell/browser/blink_test_controller.cc20
-rw-r--r--content/shell/browser/layout_test/layout_test_browser_main.cc12
-rw-r--r--content/shell/browser/shell.cc8
-rw-r--r--content/shell/browser/shell_url_request_context_getter.cc3
4 files changed, 25 insertions, 18 deletions
diff --git a/content/shell/browser/blink_test_controller.cc b/content/shell/browser/blink_test_controller.cc
index ef3eeb9..bdfcd1d 100644
--- a/content/shell/browser/blink_test_controller.cc
+++ b/content/shell/browser/blink_test_controller.cc
@@ -8,10 +8,12 @@
#include "base/base64.h"
#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/dom_storage_context.h"
#include "content/public/browser/gpu_data_manager.h"
@@ -400,7 +402,7 @@ void BlinkTestController::PluginCrashed(const base::FilePath& plugin_path,
DCHECK(CalledOnValidThread());
printer_->AddErrorMessage(
base::StringPrintf("#CRASHED - plugin (pid %d)", plugin_pid));
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&BlinkTestController::DiscardMainWindow),
base::Unretained(this)));
@@ -481,8 +483,8 @@ void BlinkTestController::DiscardMainWindow() {
WebContentsObserver::Observe(NULL);
if (test_phase_ != BETWEEN_TESTS) {
Shell::CloseAllWindows();
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
test_phase_ = CLEAN_UP;
} else if (main_window_) {
main_window_->Close();
@@ -515,7 +517,7 @@ void BlinkTestController::OnTestFinished() {
RenderViewHost* render_view_host =
main_window_->web_contents()->GetRenderViewHost();
main_window_->web_contents()->ExitFullscreen();
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&BlinkTestController::Send),
base::Unretained(this),
@@ -680,15 +682,15 @@ void BlinkTestController::OnResetDone() {
return;
}
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
}
void BlinkTestController::OnLeakDetectionDone(
const LeakDetectionResult& result) {
if (!result.leaked) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
return;
}
diff --git a/content/shell/browser/layout_test/layout_test_browser_main.cc b/content/shell/browser/layout_test/layout_test_browser_main.cc
index 44f0549..ec34751 100644
--- a/content/shell/browser/layout_test/layout_test_browser_main.cc
+++ b/content/shell/browser/layout_test/layout_test_browser_main.cc
@@ -10,11 +10,13 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/browser_main_runner.h"
#include "content/public/common/url_constants.h"
@@ -170,8 +172,8 @@ int RunTests(const scoped_ptr<content::BrowserMainRunner>& main_runner) {
break;
}
if (!ran_at_least_once) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
main_runner->Run();
}
@@ -212,8 +214,8 @@ int LayoutTestBrowserMain(
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kCheckLayoutTestSysDeps)) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
main_runner->Run();
content::Shell::CloseAllWindows();
main_runner->Shutdown();
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index 67552c8..c1a445f 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -6,11 +6,13 @@
#include "base/auto_reset.h"
#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
@@ -89,8 +91,8 @@ Shell::~Shell() {
if (windows_.empty() && quit_message_loop_) {
if (headless_)
PlatformExit();
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
}
}
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index b6218ab..cafda2d 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -93,7 +94,7 @@ net::NetworkDelegate* ShellURLRequestContextGetter::CreateNetworkDelegate() {
net::ProxyConfigService* ShellURLRequestContextGetter::GetProxyConfigService() {
return net::ProxyService::CreateSystemProxyConfigService(
- io_loop_->message_loop_proxy(), file_loop_->message_loop_proxy());
+ io_loop_->task_runner(), file_loop_->task_runner());
}
net::ProxyService* ShellURLRequestContextGetter::GetProxyService() {