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

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: rebase Created 7 years, 12 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/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..3600116fffe86ae38eaad4e28dcf58a5983bfd39 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -8,7 +8,6 @@
#include "base/bind_helpers.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
-#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -79,15 +78,14 @@ 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::NTP_NOTIFICATION_PROMO);
+ NotificationPromo::HandleClosed(NotificationPromo::NTP_NOTIFICATION_PROMO);
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
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(
NotificationPromo::NTP_NOTIFICATION_PROMO)) {
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
@@ -103,18 +101,15 @@ 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::NTP_BUBBLE_PROMO);
+ NotificationPromo::HandleClosed(NotificationPromo::NTP_BUBBLE_PROMO);
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
void NewTabPageHandler::HandleBubblePromoViewed(const ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Bubble",
PROMO_VIEWED, PROMO_ACTION_MAX);
- if (NotificationPromo::HandleViewed(Profile::FromWebUI(web_ui()),
- NotificationPromo::NTP_BUBBLE_PROMO)) {
+ if (NotificationPromo::HandleViewed(NotificationPromo::NTP_BUBBLE_PROMO))
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
- }
}
void NewTabPageHandler::HandleBubblePromoLinkClicked(const ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698