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

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

Issue 9852002: Have URL Modifications sent Regardless of Typed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/history/in_memory_history_backend.cc
===================================================================
--- chrome/browser/history/in_memory_history_backend.cc (revision 131423)
+++ chrome/browser/history/in_memory_history_backend.cc (working copy)
@@ -51,7 +51,7 @@
// We only want notifications for the associated profile.
content::Source<Profile> source(profile_);
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED, source);
- registrar_.Add(this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED,
source);
registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, source);
registrar_.Add(this,
@@ -82,7 +82,7 @@
OnKeywordSearchTermUpdated(
*content::Details<history::KeywordSearchTermDetails>(details).ptr());
break;
- case chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED:
+ case chrome::NOTIFICATION_HISTORY_URLS_MODIFIED:
OnTypedURLsModified(
*content::Details<history::URLsModifiedDetails>(details).ptr());
break;
@@ -113,11 +113,13 @@
URLRows::const_iterator i;
for (i = details.changed_urls.begin();
i != details.changed_urls.end(); i++) {
sky 2012/04/10 16:29:01 ++i
mrossetti 2012/04/11 19:38:55 Done.
- URLID id = db_->GetRowForURL(i->url(), NULL);
- if (id)
- db_->UpdateURLRow(id, *i);
- else
- id = db_->AddURL(*i);
+ if (i->typed_count() > 0) {
+ URLID id = db_->GetRowForURL(i->url(), NULL);
+ if (id)
+ db_->UpdateURLRow(id, *i);
+ else
+ db_->AddURL(*i);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698