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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/ntp_resource_cache.cc
===================================================================
--- chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (revision 91968)
+++ chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (working copy)
@@ -25,6 +25,7 @@
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
#include "chrome/browser/web_resource/promo_resource_service.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -34,7 +35,6 @@
#include "content/browser/browser_thread.h"
#include "content/browser/user_metrics.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -154,10 +154,10 @@
} // namespace
NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) {
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile)));
- registrar_.Add(this, NotificationType::PROMO_RESOURCE_STATE_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED,
NotificationService::AllSources());
// Watch for pref changes that cause us to need to invalidate the HTML cache.
@@ -195,16 +195,16 @@
: new_tab_css_.get();
}
-void NTPResourceCache::Observe(NotificationType type,
+void NTPResourceCache::Observe(int type,
const NotificationSource& source, const NotificationDetails& details) {
// Invalidate the cache.
- if (NotificationType::BROWSER_THEME_CHANGED == type ||
- NotificationType::PROMO_RESOURCE_STATE_CHANGED == type) {
+ if (chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type ||
+ chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED == type) {
new_tab_incognito_html_ = NULL;
new_tab_html_ = NULL;
new_tab_incognito_css_ = NULL;
new_tab_css_ = NULL;
- } else if (NotificationType::PREF_CHANGED == type) {
+ } else if (chrome::NOTIFICATION_PREF_CHANGED == type) {
std::string* pref_name = Details<std::string>(details).ptr();
if (*pref_name == prefs::kShowBookmarkBar ||
*pref_name == prefs::kEnableBookmarkBar ||
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.h ('k') | chrome/browser/ui/webui/ntp/shown_sections_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698