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

Side by Side Diff: chrome/browser/history/history_backend.cc

Issue 11784006: Revert "Remove VisitedLink dependency on rest of chrome" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/history/history_backend.h" 5 #include "chrome/browser/history/history_backend.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 url_info.set_title(UTF8ToUTF16(url.spec())); 1051 url_info.set_title(UTF8ToUTF16(url.spec()));
1052 } 1052 }
1053 1053
1054 url_info.set_last_visit(Time::Now()); 1054 url_info.set_last_visit(Time::Now());
1055 // Mark the page hidden. If the user types it in, it'll unhide. 1055 // Mark the page hidden. If the user types it in, it'll unhide.
1056 url_info.set_hidden(true); 1056 url_info.set_hidden(true);
1057 1057
1058 db_->AddURL(url_info); 1058 db_->AddURL(url_info);
1059 } 1059 }
1060 1060
1061 void HistoryBackend::IterateURLs(VisitedLinkDelegate::URLEnumerator* iterator) { 1061 void HistoryBackend::IterateURLs(HistoryService::URLEnumerator* iterator) {
1062 if (db_.get()) { 1062 if (db_.get()) {
1063 HistoryDatabase::URLEnumerator e; 1063 HistoryDatabase::URLEnumerator e;
1064 if (db_->InitURLEnumeratorForEverything(&e)) { 1064 if (db_->InitURLEnumeratorForEverything(&e)) {
1065 URLRow info; 1065 URLRow info;
1066 while (e.GetNextURL(&info)) { 1066 while (e.GetNextURL(&info)) {
1067 iterator->OnURL(info.url()); 1067 iterator->OnURL(info);
1068 } 1068 }
1069 iterator->OnComplete(true); // Success. 1069 iterator->OnComplete(true); // Success.
1070 return; 1070 return;
1071 } 1071 }
1072 } 1072 }
1073 iterator->OnComplete(false); // Failure. 1073 iterator->OnComplete(false); // Failure.
1074 } 1074 }
1075 1075
1076 bool HistoryBackend::GetAllTypedURLs(URLRows* urls) { 1076 bool HistoryBackend::GetAllTypedURLs(URLRows* urls) {
1077 if (db_.get()) 1077 if (db_.get())
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 info.url_id = visit.url_id; 2976 info.url_id = visit.url_id;
2977 info.time = visit.visit_time; 2977 info.time = visit.visit_time;
2978 info.transition = visit.transition; 2978 info.transition = visit.transition;
2979 // If we don't have a delegate yet during setup or shutdown, we will drop 2979 // If we don't have a delegate yet during setup or shutdown, we will drop
2980 // these notifications. 2980 // these notifications.
2981 if (delegate_.get()) 2981 if (delegate_.get())
2982 delegate_->NotifyVisitDBObserversOnAddVisit(info); 2982 delegate_->NotifyVisitDBObserversOnAddVisit(info);
2983 } 2983 }
2984 2984
2985 } // namespace history 2985 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/profiles/profile_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698