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

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

Issue 2597013005: Revert of Enable BrowserScheduler.RedirectHistoryService experiment on trunk. (Closed)
Patch Set: Created 3 years, 12 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 | testing/variations/fieldtrial_testing_config.json » ('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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 if (!thread_->StartWithOptions(options)) { 879 if (!thread_->StartWithOptions(options)) {
880 Cleanup(); 880 Cleanup();
881 return false; 881 return false;
882 } 882 }
883 backend_task_runner_ = thread_->task_runner(); 883 backend_task_runner_ = thread_->task_runner();
884 } else { 884 } else {
885 backend_task_runner_ = base::CreateSequencedTaskRunnerWithTraits( 885 backend_task_runner_ = base::CreateSequencedTaskRunnerWithTraits(
886 base::TaskTraits() 886 base::TaskTraits()
887 .WithPriority(base::TaskPriority::USER_BLOCKING) 887 .WithPriority(base::TaskPriority::USER_BLOCKING)
888 .WithShutdownBehavior(base::TaskShutdownBehavior::BLOCK_SHUTDOWN) 888 .WithShutdownBehavior(base::TaskShutdownBehavior::BLOCK_SHUTDOWN)
889 .MayBlock().WithSyncPrimitives()); 889 .MayBlock());
890 } 890 }
891 891
892 // Create the history backend. 892 // Create the history backend.
893 scoped_refptr<HistoryBackend> backend(new HistoryBackend( 893 scoped_refptr<HistoryBackend> backend(new HistoryBackend(
894 new BackendDelegate(weak_ptr_factory_.GetWeakPtr(), 894 new BackendDelegate(weak_ptr_factory_.GetWeakPtr(),
895 base::ThreadTaskRunnerHandle::Get()), 895 base::ThreadTaskRunnerHandle::Get()),
896 history_client_ ? history_client_->CreateBackendClient() : nullptr, 896 history_client_ ? history_client_->CreateBackendClient() : nullptr,
897 backend_task_runner_)); 897 backend_task_runner_));
898 history_backend_.swap(backend); 898 history_backend_.swap(backend);
899 899
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 return favicon_changed_callback_list_.Add(callback); 1148 return favicon_changed_callback_list_.Add(callback);
1149 } 1149 }
1150 1150
1151 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls, 1151 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls,
1152 const GURL& icon_url) { 1152 const GURL& icon_url) {
1153 DCHECK(thread_checker_.CalledOnValidThread()); 1153 DCHECK(thread_checker_.CalledOnValidThread());
1154 favicon_changed_callback_list_.Notify(page_urls, icon_url); 1154 favicon_changed_callback_list_.Notify(page_urls, icon_url);
1155 } 1155 }
1156 1156
1157 } // namespace history 1157 } // namespace history
OLDNEW
« no previous file with comments | « no previous file | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698