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

Unified Diff: chrome/browser/ui/webui/options/stop_syncing_handler.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: rm todos 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/ui/webui/options/stop_syncing_handler.cc
diff --git a/chrome/browser/ui/webui/options/stop_syncing_handler.cc b/chrome/browser/ui/webui/options/stop_syncing_handler.cc
index ad04a4521c3309b8e9dda623d5af1aed85fd3f07..b8747ce1e44e290ae8ec98514415c2b68bbf06dc 100644
--- a/chrome/browser/ui/webui/options/stop_syncing_handler.cc
+++ b/chrome/browser/ui/webui/options/stop_syncing_handler.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/web_ui.h"
#include "grit/chromium_strings.h"
@@ -45,8 +46,8 @@ void StopSyncingHandler::RegisterMessages() {
}
void StopSyncingHandler::StopSyncing(const ListValue* args){
- ProfileSyncService* service =
- Profile::FromWebUI(web_ui())->GetProfileSyncService();
+ ProfileSyncService* service(ProfileSyncServiceFactory::
+ GetInstance()->GetForProfile(Profile::FromWebUI(web_ui())));
if (service != NULL && ProfileSyncService::IsSyncEnabled()) {
service->DisableForUser();
ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);

Powered by Google App Engine
This is Rietveld 408576698