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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. 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/test/base/testing_io_thread_state.cc ('k') | chrome/test/base/tracing_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 0497fbd5fbdcac93f58e04c5433e75b1bd3f2a32..32da645cbd31c6b3ac68656d9c8cdc7e3e9b4083 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -7,11 +7,13 @@
#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/location.h"
#include "base/path_service.h"
#include "base/prefs/testing_pref_store.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/autocomplete/autocomplete_classifier.h"
#include "chrome/browser/autocomplete/in_memory_url_index.h"
#include "chrome/browser/autocomplete/in_memory_url_index_factory.h"
@@ -319,7 +321,7 @@ TestingProfile::TestingProfile(const base::FilePath& path,
delegate_(delegate) {
Init();
if (delegate_) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&TestingProfile::FinishInit, base::Unretained(this)));
} else {
@@ -376,7 +378,7 @@ TestingProfile::TestingProfile(
// TODO(atwilson): See if this is still required once we convert the current
// users of the constructor that takes a Delegate* param.
if (delegate_) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&TestingProfile::FinishInit, base::Unretained(this)));
} else {
@@ -596,8 +598,8 @@ void TestingProfile::DestroyHistoryService() {
// Make sure we don't have any event pending that could disrupt the next
// test.
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitClosure());
base::MessageLoop::current()->Run();
}
@@ -654,7 +656,7 @@ scoped_ptr<content::ZoomLevelDelegate> TestingProfile::CreateZoomLevelDelegate(
}
scoped_refptr<base::SequencedTaskRunner> TestingProfile::GetIOTaskRunner() {
- return base::MessageLoop::current()->message_loop_proxy();
+ return base::MessageLoop::current()->task_runner();
}
TestingPrefServiceSyncable* TestingProfile::GetTestingPrefService() {
« no previous file with comments | « chrome/test/base/testing_io_thread_state.cc ('k') | chrome/test/base/tracing_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698