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

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

Issue 1143183002: Proof of concept implementation of context based history filtering. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 421 }
422 422
423 void HistoryService::SetPageTitle(const GURL& url, 423 void HistoryService::SetPageTitle(const GURL& url,
424 const base::string16& title) { 424 const base::string16& title) {
425 DCHECK(thread_) << "History service being called after cleanup"; 425 DCHECK(thread_) << "History service being called after cleanup";
426 DCHECK(thread_checker_.CalledOnValidThread()); 426 DCHECK(thread_checker_.CalledOnValidThread());
427 ScheduleTask(PRIORITY_NORMAL, base::Bind(&HistoryBackend::SetPageTitle, 427 ScheduleTask(PRIORITY_NORMAL, base::Bind(&HistoryBackend::SetPageTitle,
428 history_backend_.get(), url, title)); 428 history_backend_.get(), url, title));
429 } 429 }
430 430
431 void HistoryService::SetPageHistoryContext(const GURL& url,
432 HistoryContext context) {
433 DCHECK(thread_) << "History service being called after cleanup";
434 DCHECK(thread_checker_.CalledOnValidThread());
435 ScheduleTask(PRIORITY_NORMAL, base::Bind(&HistoryBackend::SetPageHistoryContex t,
436 history_backend_.get(), url, context) );
437 }
431 void HistoryService::UpdateWithPageEndTime(ContextID context_id, 438 void HistoryService::UpdateWithPageEndTime(ContextID context_id,
432 int nav_entry_id, 439 int nav_entry_id,
433 const GURL& url, 440 const GURL& url,
434 Time end_ts) { 441 Time end_ts) {
435 DCHECK(thread_) << "History service being called after cleanup"; 442 DCHECK(thread_) << "History service being called after cleanup";
436 DCHECK(thread_checker_.CalledOnValidThread()); 443 DCHECK(thread_checker_.CalledOnValidThread());
437 ScheduleTask( 444 ScheduleTask(
438 PRIORITY_NORMAL, 445 PRIORITY_NORMAL,
439 base::Bind(&HistoryBackend::UpdateWithPageEndTime, history_backend_.get(), 446 base::Bind(&HistoryBackend::UpdateWithPageEndTime, history_backend_.get(),
440 context_id, nav_entry_id, url, end_ts)); 447 context_id, nav_entry_id, url, end_ts));
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 return favicon_changed_callback_list_.Add(callback); 1125 return favicon_changed_callback_list_.Add(callback);
1119 } 1126 }
1120 1127
1121 void HistoryService::NotifyFaviconChanged( 1128 void HistoryService::NotifyFaviconChanged(
1122 const std::set<GURL>& changed_favicons) { 1129 const std::set<GURL>& changed_favicons) {
1123 DCHECK(thread_checker_.CalledOnValidThread()); 1130 DCHECK(thread_checker_.CalledOnValidThread());
1124 favicon_changed_callback_list_.Notify(changed_favicons); 1131 favicon_changed_callback_list_.Notify(changed_favicons);
1125 } 1132 }
1126 1133
1127 } // namespace history 1134 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/history_service.h ('k') | components/history/core/browser/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698