| 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;
|
|
|