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

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

Issue 10067018: Add PrerenderLocalPredictor, which will eventually perform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 // The history system runs on a background thread so that potentially slow 5 // The history system runs on a background thread so that potentially slow
6 // database operations don't delay the browser. This backend processing is 6 // database operations don't delay the browser. This backend processing is
7 // represented by HistoryBackend. The HistoryService's job is to dispatch to 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to
8 // that thread. 8 // that thread.
9 // 9 //
10 // Main thread History thread 10 // Main thread History thread
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 885 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
886 if (ts) 886 if (ts)
887 ts->MigrateFromHistory(); 887 ts->MigrateFromHistory();
888 } 888 }
889 } 889 }
890 890
891 void HistoryService::OnTopSitesReady() { 891 void HistoryService::OnTopSitesReady() {
892 ScheduleAndForget(PRIORITY_NORMAL, 892 ScheduleAndForget(PRIORITY_NORMAL,
893 &HistoryBackend::MigrateThumbnailsDatabase); 893 &HistoryBackend::MigrateThumbnailsDatabase);
894 } 894 }
895
896 void HistoryService::AddVisitDatabaseObserver(
897 history::VisitDatabaseObserver* observer) {
898 LoadBackendIfNecessary();
899 history_backend_->AddVisitDatabaseObserver(observer);
900 }
901
902 void HistoryService::RemoveVisitDatabaseObserver(
903 history::VisitDatabaseObserver* observer) {
904 // If the history backend is no longer present, nothing to do here.
905 if (history_backend_)
cbentzel 2012/04/12 21:16:36 Why don't you need to do this check in the Add cas
tburkard 2012/04/12 21:32:37 In the add case, I am loading the database backend
906 history_backend_->RemoveVisitDatabaseObserver(observer);
907 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698