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

Unified Diff: chrome/browser/apps/drive/drive_app_provider.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/apps/drive/drive_app_provider.cc
diff --git a/chrome/browser/apps/drive/drive_app_provider.cc b/chrome/browser/apps/drive/drive_app_provider.cc
index a8f2fee9012cc5821d01924784f722fa23466f45..3aac05c984497052e85a77128860359b6d36f753 100644
--- a/chrome/browser/apps/drive/drive_app_provider.cc
+++ b/chrome/browser/apps/drive/drive_app_provider.cc
@@ -8,9 +8,11 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/apps/drive/drive_app_converter.h"
#include "chrome/browser/apps/drive/drive_app_mapping.h"
#include "chrome/browser/apps/drive/drive_app_uninstall_sync_service.h"
@@ -74,10 +76,9 @@ void DriveAppProvider::AddUninstalledDriveAppFromSync(
// Decouple the operation because this function could be called during
// sync processing and UpdateDriveApps could trigger another sync change.
// See http://crbug.com/429205
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&DriveAppProvider::UpdateDriveApps,
- weak_ptr_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&DriveAppProvider::UpdateDriveApps,
+ weak_ptr_factory_.GetWeakPtr()));
}
void DriveAppProvider::RemoveUninstalledDriveAppFromSync(
@@ -87,10 +88,9 @@ void DriveAppProvider::RemoveUninstalledDriveAppFromSync(
// Decouple the operation because this function could be called during
// sync processing and UpdateDriveApps could trigger another sync change.
// See http://crbug.com/429205
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&DriveAppProvider::UpdateDriveApps,
- weak_ptr_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&DriveAppProvider::UpdateDriveApps,
+ weak_ptr_factory_.GetWeakPtr()));
}
void DriveAppProvider::UpdateMappingAndExtensionSystem(
@@ -299,11 +299,10 @@ void DriveAppProvider::OnExtensionInstalled(
// Defer the processing because it touches the extensions system and
// it is better to let the current task finish to avoid unexpected
// incomplete status.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&DriveAppProvider::ProcessDeferredOnExtensionInstalled,
- weak_ptr_factory_.GetWeakPtr(),
- drive_apps_[i].app_id,
+ weak_ptr_factory_.GetWeakPtr(), drive_apps_[i].app_id,
extension->id()));
return;
}
« no previous file with comments | « chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm ('k') | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698