Index: chrome/browser/ui/webui/ntp/shown_sections_handler.cc |
diff --git a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc |
index 0a3f35c2786ba2c6778a252f6eb98702b3be8a8f..666d52a4d834bb16e0adb50d9d0633b86c7f911c 100644 |
--- a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc |
@@ -15,6 +15,7 @@ |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/extensions/extension.h" |
#include "chrome/common/pref_names.h" |
+#include "content/browser/tab_contents/tab_contents.h" |
#include "content/browser/user_metrics.h" |
#include "content/common/notification_details.h" |
@@ -87,7 +88,9 @@ void ShownSectionsHandler::HandleSetShownSections(const ListValue* args) { |
int old_mode = pref_service_->GetInteger(prefs::kNTPShownSections); |
if (old_mode != mode) { |
- NotifySectionDisabled(mode, old_mode, web_ui_->GetProfile()); |
+ Profile* profile = |
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()); |
+ NotifySectionDisabled(mode, old_mode, profile); |
pref_service_->SetInteger(prefs::kNTPShownSections, mode); |
} |
} |