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

Unified Diff: chrome/browser/history/in_memory_url_index.cc

Issue 694843002: Remove NOTIFICATION_HISTORY_URLS_MODIFIED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 1 month 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_url_index.h ('k') | chrome/browser/sync/glue/typed_url_change_processor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/in_memory_url_index.cc
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index b761164f125274e753e17ade94c8998fa45416f6..545501c23cd50861534d11a8f3ffd8a72f4efad5 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -108,8 +108,6 @@ InMemoryURLIndex::InMemoryURLIndex(Profile* profile,
if (profile) {
// TODO(mrossetti): Register for language change notifications.
content::Source<Profile> source(profile);
- registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED,
- source);
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, source);
}
if (history_service_)
@@ -189,10 +187,6 @@ void InMemoryURLIndex::Observe(int notification_type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (notification_type) {
- case chrome::NOTIFICATION_HISTORY_URLS_MODIFIED:
- OnURLsModified(
- content::Details<history::URLsModifiedDetails>(details).ptr());
- break;
case chrome::NOTIFICATION_HISTORY_URLS_DELETED:
OnURLsDeleted(
content::Details<history::URLsDeletedDetails>(details).ptr());
@@ -222,15 +216,15 @@ void InMemoryURLIndex::OnURLVisited(HistoryService* history_service,
&private_data_tracker_);
}
-void InMemoryURLIndex::OnURLsModified(const URLsModifiedDetails* details) {
- HistoryService* service =
- HistoryServiceFactory::GetForProfile(profile_,
- Profile::EXPLICIT_ACCESS);
- for (URLRows::const_iterator row = details->changed_urls.begin();
- row != details->changed_urls.end();
- ++row) {
- needs_to_be_cached_ |= private_data_->UpdateURL(
- service, *row, languages_, scheme_whitelist_, &private_data_tracker_);
+void InMemoryURLIndex::OnURLsModified(HistoryService* history_service,
+ const URLRows& changed_urls) {
+ DCHECK_EQ(history_service_, history_service);
+ for (const auto& row : changed_urls) {
+ needs_to_be_cached_ |= private_data_->UpdateURL(history_service_,
+ row,
+ languages_,
+ scheme_whitelist_,
+ &private_data_tracker_);
}
}
« no previous file with comments | « chrome/browser/history/in_memory_url_index.h ('k') | chrome/browser/sync/glue/typed_url_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698