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

Unified Diff: chrome/browser/thumbnails/thumbnail_list_source.cc

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 | « chrome/browser/thumbnails/thumbnail_list_source.h ('k') | chrome/browser/ui/webui/theme_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/thumbnails/thumbnail_list_source.cc
diff --git a/chrome/browser/thumbnails/thumbnail_list_source.cc b/chrome/browser/thumbnails/thumbnail_list_source.cc
index 8dc3d5d064136a9fe07c1c3993d8fefdc62a95c7..7966ac0e793807ed50546cd4301c3db728bf99fa 100644
--- a/chrome/browser/thumbnails/thumbnail_list_source.cc
+++ b/chrome/browser/thumbnails/thumbnail_list_source.cc
@@ -101,7 +101,7 @@ void ThumbnailListSource::StartDataRequest(
const content::URLDataSource::GotDataCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!top_sites_) {
- callback.Run(NULL);
+ callback.Run(nullptr);
return;
}
@@ -115,11 +115,12 @@ std::string ThumbnailListSource::GetMimeType(const std::string& path) const {
return "text/html";
}
-base::MessageLoop* ThumbnailListSource::MessageLoopForRequestPath(
- const std::string& path) const {
+scoped_refptr<base::SingleThreadTaskRunner>
+ThumbnailListSource::TaskRunnerForRequestPath(const std::string& path) const {
// TopSites can be accessed from the IO thread.
- return thumbnail_service_.get() ?
- NULL : content::URLDataSource::MessageLoopForRequestPath(path);
+ return thumbnail_service_.get()
+ ? nullptr
+ : content::URLDataSource::TaskRunnerForRequestPath(path);
}
bool ThumbnailListSource::ShouldServiceRequest(
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_list_source.h ('k') | chrome/browser/ui/webui/theme_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698