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 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 | 1064 |
1065 db_->AddURL(url_info); | 1065 db_->AddURL(url_info); |
1066 } | 1066 } |
1067 | 1067 |
1068 void HistoryBackend::IterateURLs(HistoryService::URLEnumerator* iterator) { | 1068 void HistoryBackend::IterateURLs(HistoryService::URLEnumerator* iterator) { |
1069 if (db_.get()) { | 1069 if (db_.get()) { |
1070 HistoryDatabase::URLEnumerator e; | 1070 HistoryDatabase::URLEnumerator e; |
1071 if (db_->InitURLEnumeratorForEverything(&e)) { | 1071 if (db_->InitURLEnumeratorForEverything(&e)) { |
1072 URLRow info; | 1072 URLRow info; |
1073 while (e.GetNextURL(&info)) { | 1073 while (e.GetNextURL(&info)) { |
1074 iterator->OnURL(info); | 1074 iterator->OnURL(info.url()); |
1075 } | 1075 } |
1076 iterator->OnComplete(true); // Success. | 1076 iterator->OnComplete(true); // Success. |
1077 return; | 1077 return; |
1078 } | 1078 } |
1079 } | 1079 } |
1080 iterator->OnComplete(false); // Failure. | 1080 iterator->OnComplete(false); // Failure. |
1081 } | 1081 } |
1082 | 1082 |
1083 bool HistoryBackend::GetAllTypedURLs(URLRows* urls) { | 1083 bool HistoryBackend::GetAllTypedURLs(URLRows* urls) { |
1084 if (db_.get()) | 1084 if (db_.get()) |
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2983 info.url_id = visit.url_id; | 2983 info.url_id = visit.url_id; |
2984 info.time = visit.visit_time; | 2984 info.time = visit.visit_time; |
2985 info.transition = visit.transition; | 2985 info.transition = visit.transition; |
2986 // If we don't have a delegate yet during setup or shutdown, we will drop | 2986 // If we don't have a delegate yet during setup or shutdown, we will drop |
2987 // these notifications. | 2987 // these notifications. |
2988 if (delegate_.get()) | 2988 if (delegate_.get()) |
2989 delegate_->NotifyVisitDBObserversOnAddVisit(info); | 2989 delegate_->NotifyVisitDBObserversOnAddVisit(info); |
2990 } | 2990 } |
2991 | 2991 |
2992 } // namespace history | 2992 } // namespace history |
OLD | NEW |