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

Unified Diff: chrome/browser/ui/webui/theme_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/ui/webui/theme_source.h ('k') | content/browser/webui/shared_resources_data_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/theme_source.cc
diff --git a/chrome/browser/ui/webui/theme_source.cc b/chrome/browser/ui/webui/theme_source.cc
index 2b13f9712b0479186e8efaaa2dfda7f1adf04863..6f7d2cab66b85c0f69755cb4403f7ad3c0b1baad 100644
--- a/chrome/browser/ui/webui/theme_source.cc
+++ b/chrome/browser/ui/webui/theme_source.cc
@@ -161,8 +161,8 @@ std::string ThemeSource::GetMimeType(const std::string& path) const {
return IsNewTabCssPath(parsed_path) ? "text/css" : "image/png";
}
-base::MessageLoop* ThemeSource::MessageLoopForRequestPath(
- const std::string& path) const {
+scoped_refptr<base::SingleThreadTaskRunner>
+ThemeSource::TaskRunnerForRequestPath(const std::string& path) const {
std::string parsed_path;
webui::ParsePathAndScale(GetThemeUrl(path), &parsed_path, nullptr);
@@ -174,8 +174,9 @@ base::MessageLoop* ThemeSource::MessageLoopForRequestPath(
// If it's not a themeable image, we don't need to go to the UI thread.
int resource_id = ResourcesUtil::GetThemeResourceId(parsed_path);
- return BrowserThemePack::IsPersistentImageID(resource_id) ?
- content::URLDataSource::MessageLoopForRequestPath(path) : nullptr;
+ return BrowserThemePack::IsPersistentImageID(resource_id)
+ ? content::URLDataSource::TaskRunnerForRequestPath(path)
+ : nullptr;
}
bool ThemeSource::ShouldServiceRequest(const net::URLRequest* request) const {
« no previous file with comments | « chrome/browser/ui/webui/theme_source.h ('k') | content/browser/webui/shared_resources_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698