| OLD | NEW |
| 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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 1061 void HistoryBackend::IterateURLs( |
| 1062 scoped_refptr<VisitedLinkDelegate::URLEnumerator> iterator) { | 1062 scoped_refptr<components::VisitedLinkDelegate::URLEnumerator> iterator) { |
| 1063 if (db_.get()) { | 1063 if (db_.get()) { |
| 1064 HistoryDatabase::URLEnumerator e; | 1064 HistoryDatabase::URLEnumerator e; |
| 1065 if (db_->InitURLEnumeratorForEverything(&e)) { | 1065 if (db_->InitURLEnumeratorForEverything(&e)) { |
| 1066 URLRow info; | 1066 URLRow info; |
| 1067 while (e.GetNextURL(&info)) { | 1067 while (e.GetNextURL(&info)) { |
| 1068 iterator->OnURL(info.url()); | 1068 iterator->OnURL(info.url()); |
| 1069 } | 1069 } |
| 1070 iterator->OnComplete(true); // Success. | 1070 iterator->OnComplete(true); // Success. |
| 1071 return; | 1071 return; |
| 1072 } | 1072 } |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2977 info.url_id = visit.url_id; | 2977 info.url_id = visit.url_id; |
| 2978 info.time = visit.visit_time; | 2978 info.time = visit.visit_time; |
| 2979 info.transition = visit.transition; | 2979 info.transition = visit.transition; |
| 2980 // If we don't have a delegate yet during setup or shutdown, we will drop | 2980 // If we don't have a delegate yet during setup or shutdown, we will drop |
| 2981 // these notifications. | 2981 // these notifications. |
| 2982 if (delegate_.get()) | 2982 if (delegate_.get()) |
| 2983 delegate_->NotifyVisitDBObserversOnAddVisit(info); | 2983 delegate_->NotifyVisitDBObserversOnAddVisit(info); |
| 2984 } | 2984 } |
| 2985 | 2985 |
| 2986 } // namespace history | 2986 } // namespace history |
| OLD | NEW |