Index: chrome/browser/ui/webui/options/options_sync_setup_handler.cc |
diff --git a/chrome/browser/ui/webui/options/options_sync_setup_handler.cc b/chrome/browser/ui/webui/options/options_sync_setup_handler.cc |
index caaa0537fc3c45544e46b54c7f6dc63ad57c6571..f4631b1b686c818723070877356e24cf39fe35c5 100644 |
--- a/chrome/browser/ui/webui/options/options_sync_setup_handler.cc |
+++ b/chrome/browser/ui/webui/options/options_sync_setup_handler.cc |
@@ -6,10 +6,12 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/sync/profile_sync_service.h" |
+#include "content/browser/tab_contents/tab_contents.h" |
void OptionsSyncSetupHandler::ShowSetupUI() { |
- ProfileSyncService* service = |
- web_ui_->GetProfile()->GetProfileSyncService(); |
+ Profile* profile = |
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()); |
+ ProfileSyncService* service = profile->GetProfileSyncService(); |
DCHECK(service); |
// If the wizard is already visible, focus it. |