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

Unified Diff: chrome/browser/background/background_contents_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/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 406411bdc348518fbf0cd879e50a01c64c37022d..de19f74c79a086465f89f4d169c7cf14dc0906ae 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -9,12 +9,15 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/location.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.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 "base/time/time.h"
#include "base/values.h"
#include "chrome/browser/background/background_contents_service_factory.h"
@@ -87,11 +90,9 @@ void CloseBalloon(const std::string& balloon_id, ProfileID profile_id) {
void ScheduleCloseBalloon(const std::string& extension_id, Profile* profile) {
if (g_disable_close_balloon_for_testing)
return;
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&CloseBalloon,
- kNotificationPrefix + extension_id,
- NotificationUIManager::GetProfileID(profile)));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&CloseBalloon, kNotificationPrefix + extension_id,
+ NotificationUIManager::GetProfileID(profile)));
}
// Delegate for the app/extension crash notification balloon. Restarts the
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider.cc ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698