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

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

Issue 5753007: Make us save favicon in incognito mode if the url is bookmarked. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Created 10 years 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/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 0bf60453157616dd3faceeb6ba2ef984be3f708e..64e1067b338a4bd40c262d296f415c9025f23f5d 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -870,6 +870,23 @@ void HistoryBackend::SetPageTitle(const GURL& url,
ScheduleCommit();
}
+void HistoryBackend::AddPageNoVisit(const GURL& url) {
+ if (!db_.get())
+ return;
+
+ URLRow url_info(url);
+ URLID url_id = db_->GetRowForURL(url, &url_info);
+ if (url_id) {
+ // URL is already known, nothing to do.
+ return;
+ }
+ url_info.set_last_visit(Time::Now());
+ // Mark the page hidden. If the user types it in, it'll unhide.
+ url_info.set_hidden(true);
+
+ db_->AddURL(url_info);
+}
+
void HistoryBackend::IterateURLs(HistoryService::URLEnumerator* iterator) {
if (db_.get()) {
HistoryDatabase::URLEnumerator e;

Powered by Google App Engine
This is Rietveld 408576698