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

Side by Side Diff: components/history/core/browser/history_service.cc

Issue 1205603002: Remove dependency of HistoryServiceFactory on ChromeBookmarkClientFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_history_client
Patch Set: Fix unit_tests on android (only register as BookmarkModelObserver if HistoryService is initialized) Created 5 years, 5 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
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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 thread_->task_runner())); 882 thread_->task_runner()));
883 history_backend_.swap(backend); 883 history_backend_.swap(backend);
884 884
885 ScheduleTask(PRIORITY_UI, 885 ScheduleTask(PRIORITY_UI,
886 base::Bind(&HistoryBackend::Init, history_backend_.get(), 886 base::Bind(&HistoryBackend::Init, history_backend_.get(),
887 languages, no_db, history_database_params)); 887 languages, no_db, history_database_params));
888 888
889 if (visit_delegate_ && !visit_delegate_->Init(this)) 889 if (visit_delegate_ && !visit_delegate_->Init(this))
890 return false; 890 return false;
891 891
892 if (history_client_)
893 history_client_->OnHistoryServiceCreated(this);
894
892 return true; 895 return true;
893 } 896 }
894 897
895 void HistoryService::ScheduleAutocomplete( 898 void HistoryService::ScheduleAutocomplete(
896 const base::Callback<void(HistoryBackend*, URLDatabase*)>& callback) { 899 const base::Callback<void(HistoryBackend*, URLDatabase*)>& callback) {
897 DCHECK(thread_checker_.CalledOnValidThread()); 900 DCHECK(thread_checker_.CalledOnValidThread());
898 ScheduleTask(PRIORITY_UI, base::Bind(&HistoryBackend::ScheduleAutocomplete, 901 ScheduleTask(PRIORITY_UI, base::Bind(&HistoryBackend::ScheduleAutocomplete,
899 history_backend_.get(), callback)); 902 history_backend_.get(), callback));
900 } 903 }
901 904
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 return favicon_changed_callback_list_.Add(callback); 1137 return favicon_changed_callback_list_.Add(callback);
1135 } 1138 }
1136 1139
1137 void HistoryService::NotifyFaviconChanged( 1140 void HistoryService::NotifyFaviconChanged(
1138 const std::set<GURL>& changed_favicons) { 1141 const std::set<GURL>& changed_favicons) {
1139 DCHECK(thread_checker_.CalledOnValidThread()); 1142 DCHECK(thread_checker_.CalledOnValidThread());
1140 favicon_changed_callback_list_.Notify(changed_favicons); 1143 favicon_changed_callback_list_.Notify(changed_favicons);
1141 } 1144 }
1142 1145
1143 } // namespace history 1146 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/history_client.h ('k') | components/history/core/test/history_client_fake_bookmarks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698