| 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);
|
|
|