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

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

Issue 2521063004: Replace ptr.reset with std::move in src/components (Closed)
Patch Set: Created 4 years, 1 month 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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive) { 961 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive) {
962 DCHECK(thread_checker_.CalledOnValidThread()); 962 DCHECK(thread_checker_.CalledOnValidThread());
963 return delete_directive_handler_.ProcessLocalDeleteDirective( 963 return delete_directive_handler_.ProcessLocalDeleteDirective(
964 delete_directive); 964 delete_directive);
965 } 965 }
966 966
967 void HistoryService::SetInMemoryBackend( 967 void HistoryService::SetInMemoryBackend(
968 std::unique_ptr<InMemoryHistoryBackend> mem_backend) { 968 std::unique_ptr<InMemoryHistoryBackend> mem_backend) {
969 DCHECK(thread_checker_.CalledOnValidThread()); 969 DCHECK(thread_checker_.CalledOnValidThread());
970 DCHECK(!in_memory_backend_) << "Setting mem DB twice"; 970 DCHECK(!in_memory_backend_) << "Setting mem DB twice";
971 in_memory_backend_.reset(mem_backend.release()); 971 in_memory_backend_ = std::move(mem_backend);
972 972
973 // The database requires additional initialization once we own it. 973 // The database requires additional initialization once we own it.
974 in_memory_backend_->AttachToHistoryService(this); 974 in_memory_backend_->AttachToHistoryService(this);
975 } 975 }
976 976
977 void HistoryService::NotifyProfileError(sql::InitStatus init_status, 977 void HistoryService::NotifyProfileError(sql::InitStatus init_status,
978 const std::string& diagnostics) { 978 const std::string& diagnostics) {
979 DCHECK(thread_checker_.CalledOnValidThread()); 979 DCHECK(thread_checker_.CalledOnValidThread());
980 if (history_client_) 980 if (history_client_)
981 history_client_->NotifyProfileError(init_status, diagnostics); 981 history_client_->NotifyProfileError(init_status, diagnostics);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 return favicon_changed_callback_list_.Add(callback); 1142 return favicon_changed_callback_list_.Add(callback);
1143 } 1143 }
1144 1144
1145 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls, 1145 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls,
1146 const GURL& icon_url) { 1146 const GURL& icon_url) {
1147 DCHECK(thread_checker_.CalledOnValidThread()); 1147 DCHECK(thread_checker_.CalledOnValidThread());
1148 favicon_changed_callback_list_.Notify(page_urls, icon_url); 1148 favicon_changed_callback_list_.Notify(page_urls, icon_url);
1149 } 1149 }
1150 1150
1151 } // namespace history 1151 } // namespace history
OLDNEW
« no previous file with comments | « components/dom_distiller/core/dom_distiller_store.cc ('k') | components/leveldb_proto/proto_database_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698