| 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 7831ab2234b18401cb2dbfc14951ddf4fe581d1b..08e133c9ceaa5fc96cf0336cf0ad5080a083352f 100644
|
| --- a/chrome/browser/ui/webui/options/stop_syncing_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/stop_syncing_handler.cc
|
| @@ -10,6 +10,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/sync/profile_sync_service.h"
|
| +#include "content/browser/tab_contents/tab_contents.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -38,7 +39,9 @@ void StopSyncingHandler::RegisterMessages() {
|
| }
|
|
|
| void StopSyncingHandler::StopSyncing(const ListValue* args){
|
| - ProfileSyncService* service = web_ui_->GetProfile()->GetProfileSyncService();
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
|
| + ProfileSyncService* service = profile->GetProfileSyncService();
|
| if (service != NULL && ProfileSyncService::IsSyncEnabled()) {
|
| service->DisableForUser();
|
| ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
|
|
|