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

Unified Diff: chrome/browser/history/top_sites.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
« no previous file with comments | « chrome/browser/history/top_sites.h ('k') | chrome/browser/importer/importer_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites.cc
===================================================================
--- chrome/browser/history/top_sites.cc (revision 91968)
+++ chrome/browser/history/top_sites.cc (working copy)
@@ -22,6 +22,7 @@
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/ntp/most_visited_handler.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/thumbnail_score.h"
@@ -142,9 +143,9 @@
return;
if (NotificationService::current()) {
- registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED,
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
Source<Profile>(profile_));
- registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED,
+ registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
NotificationService::AllSources());
}
@@ -784,13 +785,13 @@
}
}
-void TopSites::Observe(NotificationType type,
+void TopSites::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
if (!loaded_)
return;
- if (type == NotificationType::HISTORY_URLS_DELETED) {
+ if (type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) {
Details<history::URLsDeletedDetails> deleted_details(details);
if (deleted_details->all_history) {
SetTopSites(MostVisitedURLList());
@@ -816,7 +817,7 @@
SetTopSites(new_top_sites);
}
StartQueryForMostVisited();
- } else if (type == NotificationType::NAV_ENTRY_COMMITTED) {
+ } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
if (!IsFull()) {
content::LoadCommittedDetails* load_details =
Details<content::LoadCommittedDetails>(details).ptr();
@@ -911,7 +912,7 @@
ProcessPendingCallbacks(pending_callbacks, filtered_urls);
- NotificationService::current()->Notify(NotificationType::TOP_SITES_LOADED,
+ NotificationService::current()->Notify(chrome::NOTIFICATION_TOP_SITES_LOADED,
Source<Profile>(profile_),
Details<TopSites>(this));
}
@@ -931,7 +932,7 @@
void TopSites::NotifyTopSitesChanged() {
NotificationService::current()->Notify(
- NotificationType::TOP_SITES_CHANGED,
+ chrome::NOTIFICATION_TOP_SITES_CHANGED,
Source<TopSites>(this),
NotificationService::NoDetails());
}
@@ -1005,7 +1006,7 @@
// Used only in testing.
NotificationService::current()->Notify(
- NotificationType::TOP_SITES_UPDATED,
+ chrome::NOTIFICATION_TOP_SITES_UPDATED,
Source<TopSites>(this),
Details<CancelableRequestProvider::Handle>(&handle));
}
« no previous file with comments | « chrome/browser/history/top_sites.h ('k') | chrome/browser/importer/importer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698