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

Unified Diff: components/webdata/common/web_database_service.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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: components/webdata/common/web_database_service.cc
diff --git a/components/webdata/common/web_database_service.cc b/components/webdata/common/web_database_service.cc
index 1c12699c9cc9b5fef2781e2ecda5eae1e049e71e..e56c7c3cdb05871559f4c0dace3f75bbe642abc6 100644
--- a/components/webdata/common/web_database_service.cc
+++ b/components/webdata/common/web_database_service.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/thread_task_runner_handle.h"
#include "components/webdata/common/web_data_request_manager.h"
#include "components/webdata/common/web_data_results.h"
#include "components/webdata/common/web_data_service_consumer.h"
@@ -19,11 +20,9 @@ using base::FilePath;
class WebDatabaseService::BackendDelegate
: public WebDatabaseBackend::Delegate {
public:
- BackendDelegate(
- const base::WeakPtr<WebDatabaseService>& web_database_service)
+ BackendDelegate(const base::WeakPtr<WebDatabaseService>& web_database_service)
: web_database_service_(web_database_service),
- callback_thread_(base::MessageLoopProxy::current()) {
- }
+ callback_thread_(base::ThreadTaskRunnerHandle::Get()) {}
void DBLoaded(sql::InitStatus status) override {
callback_thread_->PostTask(
@@ -34,13 +33,13 @@ class WebDatabaseService::BackendDelegate
}
private:
const base::WeakPtr<WebDatabaseService> web_database_service_;
- scoped_refptr<base::MessageLoopProxy> callback_thread_;
+ scoped_refptr<base::SingleThreadTaskRunner> callback_thread_;
};
WebDatabaseService::WebDatabaseService(
const base::FilePath& path,
- const scoped_refptr<base::MessageLoopProxy>& ui_thread,
- const scoped_refptr<base::MessageLoopProxy>& db_thread)
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread,
+ scoped_refptr<base::SingleThreadTaskRunner> db_thread)
: base::RefCountedDeleteOnMessageLoop<WebDatabaseService>(ui_thread),
path_(path),
db_loaded_(false),
« no previous file with comments | « components/webdata/common/web_database_service.h ('k') | components/webdata_services/web_data_service_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698