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

Unified Diff: chrome/browser/history/in_memory_history_backend.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/in_memory_history_backend.h ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/in_memory_history_backend.cc
===================================================================
--- chrome/browser/history/in_memory_history_backend.cc (revision 91968)
+++ chrome/browser/history/in_memory_history_backend.cc (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/history/in_memory_url_index.h"
#include "chrome/browser/history/url_database.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/common/notification_details.h"
#include "content/common/notification_source.h"
@@ -62,19 +63,21 @@
// Register for the notifications we care about.
// We only want notifications for the associated profile.
Source<Profile> source(profile_);
- registrar_.Add(this, NotificationType::HISTORY_URL_VISITED, source);
- registrar_.Add(this, NotificationType::HISTORY_TYPED_URLS_MODIFIED, source);
- registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED, source);
- registrar_.Add(this, NotificationType::HISTORY_KEYWORD_SEARCH_TERM_UPDATED,
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED, source);
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
source);
- registrar_.Add(this, NotificationType::TEMPLATE_URL_REMOVED, source);
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, source);
+ registrar_.Add(this,
+ chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED,
+ source);
+ registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_REMOVED, source);
}
-void InMemoryHistoryBackend::Observe(NotificationType type,
+void InMemoryHistoryBackend::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::HISTORY_URL_VISITED: {
+ switch (type) {
+ case chrome::NOTIFICATION_HISTORY_URL_VISITED: {
Details<history::URLVisitedDetails> visited_details(details);
PageTransition::Type primary_type =
PageTransition::StripQualifier(visited_details->transition);
@@ -87,18 +90,18 @@
}
break;
}
- case NotificationType::HISTORY_KEYWORD_SEARCH_TERM_UPDATED:
+ case chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED:
OnKeywordSearchTermUpdated(
*Details<history::KeywordSearchTermDetails>(details).ptr());
break;
- case NotificationType::HISTORY_TYPED_URLS_MODIFIED:
+ case chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED:
OnTypedURLsModified(
*Details<history::URLsModifiedDetails>(details).ptr());
break;
- case NotificationType::HISTORY_URLS_DELETED:
+ case chrome::NOTIFICATION_HISTORY_URLS_DELETED:
OnURLsDeleted(*Details<history::URLsDeletedDetails>(details).ptr());
break;
- case NotificationType::TEMPLATE_URL_REMOVED:
+ case chrome::NOTIFICATION_TEMPLATE_URL_REMOVED:
db_->DeleteAllSearchTermsForKeyword(
*(Details<TemplateURLID>(details).ptr()));
break;
« no previous file with comments | « chrome/browser/history/in_memory_history_backend.h ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698