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

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

Issue 10872032: Revert 152946 - Replace HistoryQuickProvider protobuf-based caching with an SQLite-based database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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
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); 996 iterator->OnURL(info.url());
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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 info.url_id = visit.url_id; 2488 info.url_id = visit.url_id;
2489 info.time = visit.visit_time; 2489 info.time = visit.visit_time;
2490 info.transition = visit.transition; 2490 info.transition = visit.transition;
2491 // If we don't have a delegate yet during setup or shutdown, we will drop 2491 // If we don't have a delegate yet during setup or shutdown, we will drop
2492 // these notifications. 2492 // these notifications.
2493 if (delegate_.get()) 2493 if (delegate_.get())
2494 delegate_->NotifyVisitDBObserversOnAddVisit(info); 2494 delegate_->NotifyVisitDBObserversOnAddVisit(info);
2495 } 2495 }
2496 2496
2497 } // namespace history 2497 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698