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

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

Issue 2338133006: [NTP] Fix article suggestion clicks contributing to Most Visited tiles (Closed)
Patch Set: Updated trivial occurrence in unit test. Created 4 years, 3 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 ContextID context_id, 371 ContextID context_id,
372 int nav_entry_id, 372 int nav_entry_id,
373 const GURL& referrer, 373 const GURL& referrer,
374 const RedirectList& redirects, 374 const RedirectList& redirects,
375 ui::PageTransition transition, 375 ui::PageTransition transition,
376 VisitSource visit_source, 376 VisitSource visit_source,
377 bool did_replace_entry) { 377 bool did_replace_entry) {
378 DCHECK(thread_checker_.CalledOnValidThread()); 378 DCHECK(thread_checker_.CalledOnValidThread());
379 AddPage(HistoryAddPageArgs(url, time, context_id, nav_entry_id, referrer, 379 AddPage(HistoryAddPageArgs(url, time, context_id, nav_entry_id, referrer,
380 redirects, transition, visit_source, 380 redirects, transition, visit_source,
381 did_replace_entry)); 381 did_replace_entry, true));
382 } 382 }
383 383
384 void HistoryService::AddPage(const GURL& url, 384 void HistoryService::AddPage(const GURL& url,
385 base::Time time, 385 base::Time time,
386 VisitSource visit_source) { 386 VisitSource visit_source) {
387 DCHECK(thread_checker_.CalledOnValidThread()); 387 DCHECK(thread_checker_.CalledOnValidThread());
388 AddPage(HistoryAddPageArgs(url, time, nullptr, 0, GURL(), RedirectList(), 388 AddPage(HistoryAddPageArgs(url, time, nullptr, 0, GURL(), RedirectList(),
389 ui::PAGE_TRANSITION_LINK, visit_source, false)); 389 ui::PAGE_TRANSITION_LINK, visit_source, false,
390 true));
390 } 391 }
391 392
392 void HistoryService::AddPage(const HistoryAddPageArgs& add_page_args) { 393 void HistoryService::AddPage(const HistoryAddPageArgs& add_page_args) {
393 DCHECK(thread_) << "History service being called after cleanup"; 394 DCHECK(thread_) << "History service being called after cleanup";
394 DCHECK(thread_checker_.CalledOnValidThread()); 395 DCHECK(thread_checker_.CalledOnValidThread());
395 396
396 // Filter out unwanted URLs. We don't add auto-subframe URLs. They are a 397 // Filter out unwanted URLs. We don't add auto-subframe URLs. They are a
397 // large part of history (think iframes for ads) and we never display them in 398 // large part of history (think iframes for ads) and we never display them in
398 // history UI. We will still add manual subframes, which are ones the user 399 // history UI. We will still add manual subframes, which are ones the user
399 // has clicked on to get. 400 // has clicked on to get.
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 return favicon_changed_callback_list_.Add(callback); 1141 return favicon_changed_callback_list_.Add(callback);
1141 } 1142 }
1142 1143
1143 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls, 1144 void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls,
1144 const GURL& icon_url) { 1145 const GURL& icon_url) {
1145 DCHECK(thread_checker_.CalledOnValidThread()); 1146 DCHECK(thread_checker_.CalledOnValidThread());
1146 favicon_changed_callback_list_.Notify(page_urls, icon_url); 1147 favicon_changed_callback_list_.Notify(page_urls, icon_url);
1147 } 1148 }
1148 1149
1149 } // namespace history 1150 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/history_backend_unittest.cc ('k') | components/history/core/browser/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698