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

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

Issue 2723953002: [sync] skeleton implementation of TypedURLSyncBridge (Closed)
Patch Set: rebase and address missing parts for bug 558320 Created 3 years, 9 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 ScheduleTask(PRIORITY_NORMAL, 227 ScheduleTask(PRIORITY_NORMAL,
228 base::Bind(&HistoryBackend::ClearCachedDataForContextID, 228 base::Bind(&HistoryBackend::ClearCachedDataForContextID,
229 history_backend_, context_id)); 229 history_backend_, context_id));
230 } 230 }
231 231
232 URLDatabase* HistoryService::InMemoryDatabase() { 232 URLDatabase* HistoryService::InMemoryDatabase() {
233 DCHECK(thread_checker_.CalledOnValidThread()); 233 DCHECK(thread_checker_.CalledOnValidThread());
234 return in_memory_backend_ ? in_memory_backend_->db() : nullptr; 234 return in_memory_backend_ ? in_memory_backend_->db() : nullptr;
235 } 235 }
236 236
237 TypedURLSyncBridge* HistoryService::GetTypedURLSyncBridge() const {
238 return history_backend_->GetTypedURLSyncBridge();
239 }
240
237 TypedUrlSyncableService* HistoryService::GetTypedUrlSyncableService() const { 241 TypedUrlSyncableService* HistoryService::GetTypedUrlSyncableService() const {
238 return history_backend_->GetTypedUrlSyncableService(); 242 return history_backend_->GetTypedUrlSyncableService();
239 } 243 }
240 244
241 void HistoryService::Shutdown() { 245 void HistoryService::Shutdown() {
242 DCHECK(thread_checker_.CalledOnValidThread()); 246 DCHECK(thread_checker_.CalledOnValidThread());
243 Cleanup(); 247 Cleanup();
244 } 248 }
245 249
246 void HistoryService::SetKeywordSearchTermsForURL(const GURL& url, 250 void HistoryService::SetKeywordSearchTermsForURL(const GURL& url,
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 return favicon_changed_callback_list_.Add(callback); 1153 return favicon_changed_callback_list_.Add(callback);
1150 } 1154 }
1151 1155
1152 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls, 1156 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls,
1153 const GURL& icon_url) { 1157 const GURL& icon_url) {
1154 DCHECK(thread_checker_.CalledOnValidThread()); 1158 DCHECK(thread_checker_.CalledOnValidThread());
1155 favicon_changed_callback_list_.Notify(page_urls, icon_url); 1159 favicon_changed_callback_list_.Notify(page_urls, icon_url);
1156 } 1160 }
1157 1161
1158 } // namespace history 1162 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698