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

Unified Diff: chrome/browser/dom_ui/ntp_resource_cache.cc

Issue 6542003: Refactor WebResourceService class, making it more generic. Move all the prom... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: For the records Created 9 years, 10 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
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/dom_ui/tips_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/ntp_resource_cache.cc
===================================================================
--- chrome/browser/dom_ui/ntp_resource_cache.cc (revision 74703)
+++ chrome/browser/dom_ui/ntp_resource_cache.cc (working copy)
@@ -22,7 +22,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/browser_theme_provider.h"
-#include "chrome/browser/web_resource/web_resource_service.h"
+#include "chrome/browser/web_resource/promo_resource_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -149,7 +149,7 @@
NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) {
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::WEB_RESOURCE_STATE_CHANGED,
+ registrar_.Add(this, NotificationType::PROMO_RESOURCE_STATE_CHANGED,
NotificationService::AllSources());
// Watch for pref changes that cause us to need to invalidate the HTML cache.
@@ -190,7 +190,7 @@
const NotificationSource& source, const NotificationDetails& details) {
// Invalidate the cache.
if (NotificationType::BROWSER_THEME_CHANGED == type ||
- NotificationType::WEB_RESOURCE_STATE_CHANGED == type) {
+ NotificationType::PROMO_RESOURCE_STATE_CHANGED == type) {
new_tab_incognito_html_ = NULL;
new_tab_html_ = NULL;
new_tab_incognito_css_ = NULL;
@@ -380,7 +380,7 @@
if (profile_->GetPrefs()->FindPreference(prefs::kNTPPromoStart) &&
profile_->GetPrefs()->FindPreference(prefs::kNTPPromoEnd) &&
profile_->GetPrefs()->FindPreference(prefs::kNTPPromoLine) &&
- WebResourceServiceUtil::CanShowPromo(profile_)) {
+ PromoResourceServiceUtil::CanShowPromo(profile_)) {
localized_strings.SetString("serverpromo",
InDateRange(profile_->GetPrefs()->GetDouble(prefs::kNTPPromoStart),
profile_->GetPrefs()->GetDouble(prefs::kNTPPromoEnd)) ?
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/dom_ui/tips_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698