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

Unified Diff: chrome/browser/ui/webui/options2/stop_syncing_handler2.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/options2/stop_syncing_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/stop_syncing_handler2.cc b/chrome/browser/ui/webui/options2/stop_syncing_handler2.cc
index 367853577bec302542d946a16bcb27bac32cafc4..37e60c24083d28ceeeb8db2d11b7808c1ac1ba61 100644
--- a/chrome/browser/ui/webui/options2/stop_syncing_handler2.cc
+++ b/chrome/browser/ui/webui/options2/stop_syncing_handler2.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"
@@ -47,8 +48,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);
« no previous file with comments | « chrome/browser/ui/webui/options2/options_sync_setup_handler2.cc ('k') | chrome/browser/ui/webui/sessions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698