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

Unified Diff: chrome/browser/ui/webui/ntp/shown_sections_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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/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);
}
}

Powered by Google App Engine
This is Rietveld 408576698