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

Unified Diff: chrome/browser/sync/glue/typed_url_change_processor.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/sync/glue/typed_url_change_processor.cc
===================================================================
--- chrome/browser/sync/glue/typed_url_change_processor.cc (revision 91968)
+++ chrome/browser/sync/glue/typed_url_change_processor.cc (working copy)
@@ -13,8 +13,8 @@
#include "chrome/browser/sync/glue/typed_url_model_associator.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/protocol/typed_url_specifics.pb.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
namespace browser_sync {
@@ -50,7 +50,7 @@
DCHECK(expected_loop_ == MessageLoop::current());
}
-void TypedUrlChangeProcessor::Observe(NotificationType type,
+void TypedUrlChangeProcessor::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK(expected_loop_ == MessageLoop::current());
@@ -59,14 +59,14 @@
VLOG(1) << "Observed typed_url change.";
DCHECK(running());
- DCHECK(NotificationType::HISTORY_TYPED_URLS_MODIFIED == type ||
- NotificationType::HISTORY_URLS_DELETED == type ||
- NotificationType::HISTORY_URL_VISITED == type);
- if (type == NotificationType::HISTORY_TYPED_URLS_MODIFIED) {
+ DCHECK(chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED == type ||
+ chrome::NOTIFICATION_HISTORY_URLS_DELETED == type ||
+ chrome::NOTIFICATION_HISTORY_URL_VISITED == type);
+ if (type == chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED) {
HandleURLsModified(Details<history::URLsModifiedDetails>(details).ptr());
- } else if (type == NotificationType::HISTORY_URLS_DELETED) {
+ } else if (type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) {
HandleURLsDeleted(Details<history::URLsDeletedDetails>(details).ptr());
- } else if (type == NotificationType::HISTORY_URL_VISITED) {
+ } else if (type == chrome::NOTIFICATION_HISTORY_URL_VISITED) {
HandleURLsVisited(Details<history::URLVisitedDetails>(details).ptr());
}
}
@@ -347,25 +347,25 @@
void TypedUrlChangeProcessor::StartObserving() {
DCHECK(expected_loop_ == MessageLoop::current());
notification_registrar_.Add(this,
- NotificationType::HISTORY_TYPED_URLS_MODIFIED,
+ chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
NotificationService::AllSources());
- notification_registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED,
+ notification_registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
NotificationService::AllSources());
- notification_registrar_.Add(this, NotificationType::HISTORY_URL_VISITED,
+ notification_registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED,
NotificationService::AllSources());
}
void TypedUrlChangeProcessor::StopObserving() {
DCHECK(expected_loop_ == MessageLoop::current());
+ notification_registrar_.Remove(
+ this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
+ NotificationService::AllSources());
notification_registrar_.Remove(this,
- NotificationType::HISTORY_TYPED_URLS_MODIFIED,
+ chrome::NOTIFICATION_HISTORY_URLS_DELETED,
NotificationService::AllSources());
notification_registrar_.Remove(this,
- NotificationType::HISTORY_URLS_DELETED,
+ chrome::NOTIFICATION_HISTORY_URL_VISITED,
NotificationService::AllSources());
- notification_registrar_.Remove(this,
- NotificationType::HISTORY_URL_VISITED,
- NotificationService::AllSources());
}
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/glue/typed_url_change_processor.h ('k') | chrome/browser/sync/glue/typed_url_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698