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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 9169096: Remove a bunch of GetProfileSyncService callers to use the new factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests + compile Created 8 years, 11 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/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index cd53c8fb480de4e2516d75b37a97f0f86d1ca157..cf917e67658caa825250e3cf8b5aa140335194d7 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h"
@@ -821,8 +822,11 @@ void ProfileManager::ScheduleProfileForDeletion(const FilePath& profile_dir) {
BrowserList::CloseAllBrowsersWithProfile(profile);
// Disable sync for doomed profile.
- if (profile->HasProfileSyncService())
- profile->GetProfileSyncService()->DisableForUser();
+ if (ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService(
+ profile)) {
+ ProfileSyncServiceFactory::GetInstance()->GetForProfile(
+ profile)->DisableForUser();
+ }
}
QueueProfileDirectoryForDeletion(profile_dir);

Powered by Google App Engine
This is Rietveld 408576698