| 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 <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 | 986 |
| 987 db_->AddURL(url_info); | 987 db_->AddURL(url_info); |
| 988 } | 988 } |
| 989 | 989 |
| 990 void HistoryBackend::IterateURLs(HistoryService::URLEnumerator* iterator) { | 990 void HistoryBackend::IterateURLs(HistoryService::URLEnumerator* iterator) { |
| 991 if (db_.get()) { | 991 if (db_.get()) { |
| 992 HistoryDatabase::URLEnumerator e; | 992 HistoryDatabase::URLEnumerator e; |
| 993 if (db_->InitURLEnumeratorForEverything(&e)) { | 993 if (db_->InitURLEnumeratorForEverything(&e)) { |
| 994 URLRow info; | 994 URLRow info; |
| 995 while (e.GetNextURL(&info)) { | 995 while (e.GetNextURL(&info)) { |
| 996 iterator->OnURL(info.url()); | 996 iterator->OnURL(info); |
| 997 } | 997 } |
| 998 iterator->OnComplete(true); // Success. | 998 iterator->OnComplete(true); // Success. |
| 999 return; | 999 return; |
| 1000 } | 1000 } |
| 1001 } | 1001 } |
| 1002 iterator->OnComplete(false); // Failure. | 1002 iterator->OnComplete(false); // Failure. |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 bool HistoryBackend::GetAllTypedURLs(URLRows* urls) { | 1005 bool HistoryBackend::GetAllTypedURLs(URLRows* urls) { |
| 1006 if (db_.get()) | 1006 if (db_.get()) |
| (...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2484 info.url_id = visit.url_id; | 2484 info.url_id = visit.url_id; |
| 2485 info.time = visit.visit_time; | 2485 info.time = visit.visit_time; |
| 2486 info.transition = visit.transition; | 2486 info.transition = visit.transition; |
| 2487 // If we don't have a delegate yet during setup or shutdown, we will drop | 2487 // If we don't have a delegate yet during setup or shutdown, we will drop |
| 2488 // these notifications. | 2488 // these notifications. |
| 2489 if (delegate_.get()) | 2489 if (delegate_.get()) |
| 2490 delegate_->NotifyVisitDBObserversOnAddVisit(info); | 2490 delegate_->NotifyVisitDBObserversOnAddVisit(info); |
| 2491 } | 2491 } |
| 2492 | 2492 |
| 2493 } // namespace history | 2493 } // namespace history |
| OLD | NEW |