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

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

Issue 6135001: Makes the in memory db update rows that have search terms associated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve comments and forward declare Created 9 years, 11 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/url_database.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
diff --git a/chrome/browser/history/in_memory_history_backend.cc b/chrome/browser/history/in_memory_history_backend.cc
index 978c8c4b4843840459ff89ae6c3e71e1d7f7bc6d..25219f60ad4dcb0915371ce20460282516feaffb 100644
--- a/chrome/browser/history/in_memory_history_backend.cc
+++ b/chrome/browser/history/in_memory_history_backend.cc
@@ -90,7 +90,8 @@ void InMemoryHistoryBackend::Observe(NotificationType type,
PageTransition::Type primary_type =
PageTransition::StripQualifier(visited_details->transition);
if (visited_details->row.typed_count() > 0 ||
- primary_type == PageTransition::KEYWORD) {
+ primary_type == PageTransition::KEYWORD ||
+ HasKeyword(visited_details->row.url())) {
brettw 2011/01/06 20:43:34 Doesn't the row here have the keyword details as w
URLsModifiedDetails modified_details;
modified_details.changed_urls.push_back(visited_details->row);
OnTypedURLsModified(modified_details);
@@ -186,4 +187,12 @@ void InMemoryHistoryBackend::OnKeywordSearchTermUpdated(
db_->SetKeywordSearchTermsForURL(url_id, details.keyword_id, details.term);
}
+bool InMemoryHistoryBackend::HasKeyword(const GURL& url) {
+ URLID id = db_->GetRowForURL(url, NULL);
+ if (!id)
+ return false;
+
+ return db_->GetKeywordSearchTermRow(id, NULL);
+}
+
} // namespace history
« no previous file with comments | « chrome/browser/history/in_memory_history_backend.h ('k') | chrome/browser/history/url_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698