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

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

Issue 879763002: Remove dependencies of InMemoryURLIndex on Profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@773103004
Patch Set: Fix InMemoryURLIndexCacheTest.CacheFilePath failure 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
« no previous file with comments | « no previous file | chrome/browser/history/in_memory_url_index.h » ('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 // 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 return false; 956 return false;
957 } 957 }
958 958
959 history_dir_ = history_database_params.history_dir; 959 history_dir_ = history_database_params.history_dir;
960 no_db_ = no_db; 960 no_db_ = no_db;
961 961
962 if (profile_) { 962 if (profile_) {
963 std::string languages = 963 std::string languages =
964 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); 964 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages);
965 in_memory_url_index_.reset(new history::InMemoryURLIndex( 965 in_memory_url_index_.reset(new history::InMemoryURLIndex(
966 profile_, this, history_dir_, languages, history_client_)); 966 this, history_dir_, languages, history_client_));
967 in_memory_url_index_->Init(); 967 in_memory_url_index_->Init();
968 } 968 }
969 969
970 // Create the history backend. 970 // Create the history backend.
971 scoped_refptr<HistoryBackend> backend(new HistoryBackend( 971 scoped_refptr<HistoryBackend> backend(new HistoryBackend(
972 history_dir_, new BackendDelegate(weak_ptr_factory_.GetWeakPtr(), 972 history_dir_, new BackendDelegate(weak_ptr_factory_.GetWeakPtr(),
973 base::ThreadTaskRunnerHandle::Get()), 973 base::ThreadTaskRunnerHandle::Get()),
974 history_client_)); 974 history_client_));
975 history_backend_.swap(backend); 975 history_backend_.swap(backend);
976 976
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 const HistoryService::OnFaviconChangedCallback& callback) { 1268 const HistoryService::OnFaviconChangedCallback& callback) {
1269 DCHECK(thread_checker_.CalledOnValidThread()); 1269 DCHECK(thread_checker_.CalledOnValidThread());
1270 return favicon_changed_callback_list_.Add(callback); 1270 return favicon_changed_callback_list_.Add(callback);
1271 } 1271 }
1272 1272
1273 void HistoryService::NotifyFaviconChanged( 1273 void HistoryService::NotifyFaviconChanged(
1274 const std::set<GURL>& changed_favicons) { 1274 const std::set<GURL>& changed_favicons) {
1275 DCHECK(thread_checker_.CalledOnValidThread()); 1275 DCHECK(thread_checker_.CalledOnValidThread());
1276 favicon_changed_callback_list_.Notify(changed_favicons); 1276 favicon_changed_callback_list_.Notify(changed_favicons);
1277 } 1277 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/in_memory_url_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698