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

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

Issue 11689004: Move PromoResourceService from Profile to BrowserProcessImpl/local_state(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android x 4 Created 8 years 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/new_tab_page_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index e2b8f3727e5895b5cebea4761269ca6d99790c4f..a2d38fa742fc505033bf694375418b3b7ebdc1e5 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -79,7 +79,7 @@ void NewTabPageHandler::RegisterMessages() {
void NewTabPageHandler::HandleNotificationPromoClosed(const ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Notification",
PROMO_CLOSED, PROMO_ACTION_MAX);
- NotificationPromo::HandleClosed(Profile::FromWebUI(web_ui()),
+ NotificationPromo::HandleClosed(g_browser_process->local_state(),
NotificationPromo::NTP_NOTIFICATION_PROMO);
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
@@ -87,7 +87,7 @@ void NewTabPageHandler::HandleNotificationPromoClosed(const ListValue* args) {
void NewTabPageHandler::HandleNotificationPromoViewed(const ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Notification",
PROMO_VIEWED, PROMO_ACTION_MAX);
- if (NotificationPromo::HandleViewed(Profile::FromWebUI(web_ui()),
+ if (NotificationPromo::HandleViewed(g_browser_process->local_state(),
NotificationPromo::NTP_NOTIFICATION_PROMO)) {
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
@@ -103,7 +103,7 @@ void NewTabPageHandler::HandleNotificationPromoLinkClicked(
void NewTabPageHandler::HandleBubblePromoClosed(const ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Bubble",
PROMO_CLOSED, PROMO_ACTION_MAX);
- NotificationPromo::HandleClosed(Profile::FromWebUI(web_ui()),
+ NotificationPromo::HandleClosed(g_browser_process->local_state(),
NotificationPromo::NTP_BUBBLE_PROMO);
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
@@ -111,7 +111,7 @@ void NewTabPageHandler::HandleBubblePromoClosed(const ListValue* args) {
void NewTabPageHandler::HandleBubblePromoViewed(const ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Bubble",
PROMO_VIEWED, PROMO_ACTION_MAX);
- if (NotificationPromo::HandleViewed(Profile::FromWebUI(web_ui()),
+ if (NotificationPromo::HandleViewed(g_browser_process->local_state(),
NotificationPromo::NTP_BUBBLE_PROMO)) {
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}

Powered by Google App Engine
This is Rietveld 408576698