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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 78088978b710e8d3e8b46a82244a5e0cd0eb8e5d..e780640d27d56eea746510a35c7d0e8eca758063 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -785,8 +785,10 @@ void ProfileSyncService::OnUnrecoverableErrorImpl(
<< " -- ProfileSyncService unusable: " << message;
// Shut all data types down.
- MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(&ProfileSyncService::ShutdownImpl, weak_factory_.GetWeakPtr(),
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&ProfileSyncService::ShutdownImpl,
+ weak_factory_.GetWeakPtr(),
delete_sync_database));
}
@@ -808,7 +810,8 @@ void ProfileSyncService::DisableBrokenDatatype(
failed_datatypes_handler_.UpdateFailedDatatypes(errors,
FailedDatatypesHandler::RUNTIME);
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&ProfileSyncService::ReconfigureDatatypeManager,
weak_factory_.GetWeakPtr()));
}
@@ -909,7 +912,8 @@ void ProfileSyncService::OnSyncCycleCompleted() {
// model associator listens too. Also consider somehow plumbing the current
// server time as last reported by CheckServerReachable, so we don't have to
// rely on the local clock, which may be off significantly.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&browser_sync::SessionModelAssociator::DeleteStaleSessions,
GetSessionModelAssociator()->AsWeakPtr()));
}
@@ -1246,9 +1250,11 @@ void ProfileSyncService::OnConfigureDone(
}
// Now handle partial success and full success.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&ProfileSyncService::OnSyncConfigureDone,
- weak_factory_.GetWeakPtr(), result));
+ weak_factory_.GetWeakPtr(),
+ result));
// We should never get in a state where we have no encrypted datatypes
// enabled, and yet we still think we require a passphrase for decryption.

Powered by Google App Engine
This is Rietveld 408576698