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

Unified Diff: content/public/browser/url_data_source.h

Issue 2476433002: Replace URLDataSource::MessageLoopForRequestPath() with TaskRunnerForRequestPath(). (Closed)
Patch Set: rebase off local branch Created 4 years, 1 month 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 | « content/browser/webui/url_data_manager_backend.cc ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/url_data_source.h
diff --git a/content/public/browser/url_data_source.h b/content/public/browser/url_data_source.h
index ed6a343845f8cad82effbf4c52d54cfba2778536..fc2814abfa745b7166dfd7da55789566aef3e8f4 100644
--- a/content/public/browser/url_data_source.h
+++ b/content/public/browser/url_data_source.h
@@ -9,11 +9,11 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "base/single_thread_task_runner.h"
#include "content/common/content_export.h"
#include "content/public/browser/resource_request_info.h"
namespace base {
-class MessageLoop;
class RefCountedMemory;
}
@@ -68,15 +68,15 @@ class CONTENT_EXPORT URLDataSource {
// The following methods are all called on the IO thread.
- // Returns the MessageLoop on which the delegate wishes to have
+ // Returns the TaskRunner on which the delegate wishes to have
// StartDataRequest called to handle the request for |path|. The default
// implementation returns BrowserThread::UI. If the delegate does not care
// which thread StartDataRequest is called on, this should return nullptr.
// It may be beneficial to return nullptr for requests that are safe to handle
// directly on the IO thread. This can improve performance by satisfying such
// requests more rapidly when there is a large amount of UI thread contention.
- // Or the delegate can return a specific thread's Messageloop if they wish.
- virtual base::MessageLoop* MessageLoopForRequestPath(
+ // Or the delegate can return a specific thread's TaskRunner if they wish.
+ virtual scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath(
const std::string& path) const;
// Returns true if the URLDataSource should replace an existing URLDataSource
« no previous file with comments | « content/browser/webui/url_data_manager_backend.cc ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698