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

Unified Diff: chrome/browser/bookmarks/bookmark_model.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/bookmarks/bookmark_model.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_model.cc (revision 91880)
+++ chrome/browser/bookmarks/bookmark_model.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
@@ -143,7 +144,7 @@
// Listen for changes to favicons so that we can update the favicon of the
// node appropriately.
- registrar_.Add(this, NotificationType::FAVICON_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED,
Source<Profile>(profile_));
// Load the bookmarks. BookmarkStorage notifies us when done.
@@ -581,7 +582,7 @@
// And generic notification.
NotificationService::current()->Notify(
- NotificationType::BOOKMARK_MODEL_LOADED,
+ chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
Source<Profile>(profile_),
NotificationService::NoDetails());
}
@@ -633,7 +634,7 @@
}
NotificationService::current()->Notify(
- NotificationType::URLS_STARRED,
+ chrome::NOTIFICATION_URLS_STARRED,
Source<Profile>(profile_),
Details<history::URLsStarredDetails>(&details));
}
@@ -666,7 +667,7 @@
history::URLsStarredDetails details(true);
details.changed_urls.insert(node->GetURL());
NotificationService::current()->Notify(
- NotificationType::URLS_STARRED,
+ chrome::NOTIFICATION_URLS_STARRED,
Source<Profile>(profile_),
Details<history::URLsStarredDetails>(&details));
}
@@ -759,11 +760,11 @@
}
}
-void BookmarkModel::Observe(NotificationType type,
+void BookmarkModel::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::FAVICON_CHANGED: {
+ switch (type) {
+ case chrome::NOTIFICATION_FAVICON_CHANGED: {
// Prevent the observers from getting confused for multiple favicon loads.
Details<history::FaviconChangeDetails> favicon_details(details);
for (std::set<GURL>::const_iterator i = favicon_details->urls.begin();

Powered by Google App Engine
This is Rietveld 408576698