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

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

Issue 896983003: Componentize ScoredHistoryMatch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename ScoredHistoryMatchBuilder to ScoredHistoryMatchBuilderImpl Created 5 years, 10 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 Cleanup(); 969 Cleanup();
970 return false; 970 return false;
971 } 971 }
972 972
973 history_dir_ = history_database_params.history_dir; 973 history_dir_ = history_database_params.history_dir;
974 no_db_ = no_db; 974 no_db_ = no_db;
975 975
976 if (!languages.empty()) { 976 if (!languages.empty()) {
977 // Do not create |in_memory_url_index_| when languages is empty (which 977 // Do not create |in_memory_url_index_| when languages is empty (which
978 // should only happens during testing). 978 // should only happens during testing).
979 in_memory_url_index_.reset(new history::InMemoryURLIndex( 979 in_memory_url_index_.reset(
980 this, history_dir_, languages, history_client_)); 980 new history::InMemoryURLIndex(this, history_dir_, languages));
981 in_memory_url_index_->Init(); 981 in_memory_url_index_->Init();
982 } 982 }
983 983
984 // Create the history backend. 984 // Create the history backend.
985 scoped_refptr<HistoryBackend> backend(new HistoryBackend( 985 scoped_refptr<HistoryBackend> backend(new HistoryBackend(
986 history_dir_, new BackendDelegate(weak_ptr_factory_.GetWeakPtr(), 986 history_dir_, new BackendDelegate(weak_ptr_factory_.GetWeakPtr(),
987 base::ThreadTaskRunnerHandle::Get()), 987 base::ThreadTaskRunnerHandle::Get()),
988 history_client_)); 988 history_client_));
989 history_backend_.swap(backend); 989 history_backend_.swap(backend);
990 990
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 const HistoryService::OnFaviconChangedCallback& callback) { 1276 const HistoryService::OnFaviconChangedCallback& callback) {
1277 DCHECK(thread_checker_.CalledOnValidThread()); 1277 DCHECK(thread_checker_.CalledOnValidThread());
1278 return favicon_changed_callback_list_.Add(callback); 1278 return favicon_changed_callback_list_.Add(callback);
1279 } 1279 }
1280 1280
1281 void HistoryService::NotifyFaviconChanged( 1281 void HistoryService::NotifyFaviconChanged(
1282 const std::set<GURL>& changed_favicons) { 1282 const std::set<GURL>& changed_favicons) {
1283 DCHECK(thread_checker_.CalledOnValidThread()); 1283 DCHECK(thread_checker_.CalledOnValidThread());
1284 favicon_changed_callback_list_.Notify(changed_favicons); 1284 favicon_changed_callback_list_.Notify(changed_favicons);
1285 } 1285 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698