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

Unified Diff: chrome/browser/themes/theme_service.cc

Issue 1143343005: chrome/browser: 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, 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: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 8f613031d8ad333fa2f50457da2444b411456307..ec7cfe68a7c34276612c8a6eab58dacb05ae804e 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -7,12 +7,14 @@
#include <algorithm>
#include "base/bind.h"
+#include "base/location.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -495,10 +497,9 @@ void ThemeService::ClearAllThemeData() {
// http://crbug.com/62154
// RemoveUnusedThemes is called on a task because ClearAllThemeData() may
// be called as a result of NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED.
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(&ThemeService::RemoveUnusedThemes,
- weak_ptr_factory_.GetWeakPtr(),
- true));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&ThemeService::RemoveUnusedThemes,
+ weak_ptr_factory_.GetWeakPtr(), true));
}
void ThemeService::LoadThemePrefs() {
@@ -586,10 +587,9 @@ void ThemeService::OnExtensionServiceReady() {
extensions::NOTIFICATION_EXTENSION_ENABLED,
content::Source<Profile>(profile_));
- base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
- base::Bind(&ThemeService::RemoveUnusedThemes,
- weak_ptr_factory_.GetWeakPtr(),
- false),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&ThemeService::RemoveUnusedThemes,
+ weak_ptr_factory_.GetWeakPtr(), false),
base::TimeDelta::FromSeconds(kRemoveUnusedThemesStartupDelay));
}
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest_util.cc ('k') | chrome/browser/web_resource/promo_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698