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

Unified Diff: components/webdata/common/web_data_request_manager.h

Issue 2087583002: Remove calls to MessageLoop::current() in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test error Created 4 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
Index: components/webdata/common/web_data_request_manager.h
diff --git a/components/webdata/common/web_data_request_manager.h b/components/webdata/common/web_data_request_manager.h
index 97ac227328f88094ce5e94357756669fdd0c043d..a61cea445b1caf1a24b5b342068f56b7593520ae 100644
--- a/components/webdata/common/web_data_request_manager.h
+++ b/components/webdata/common/web_data_request_manager.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "components/webdata/common/web_data_results.h"
#include "components/webdata/common/web_data_service_base.h"
@@ -23,10 +24,6 @@
class WebDataServiceConsumer;
class WebDataRequestManager;
-namespace base {
-class MessageLoop;
-}
-
//////////////////////////////////////////////////////////////////////////////
//
// Webdata requests
@@ -46,8 +43,8 @@ class WebDataRequest {
// Retrieves the |consumer_| set in the constructor.
WebDataServiceConsumer* GetConsumer() const;
- // Retrieves the original message loop the of the request.
- base::MessageLoop* GetMessageLoop() const;
+ // Retrieves the original task runner of the request.
+ scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() const;
// Returns |true| if the request was cancelled via the |Cancel()| method.
bool IsCancelled() const;
@@ -71,8 +68,8 @@ class WebDataRequest {
// a ref_ptr so that it can be set to NULL when a request is cancelled.
WebDataRequestManager* manager_;
- // Tracks loop that the request originated on.
- base::MessageLoop* message_loop_;
+ // Tracks task runner that the request originated on.
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
// Identifier for this request.
WebDataServiceBase::Handle handle_;
« no previous file with comments | « components/variations/variations_http_header_provider.cc ('k') | components/webdata/common/web_data_request_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698