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

Side by Side Diff: chrome/browser/history/history.cc

Issue 2948008: Fix missing thumbnails for new profile with TopSites. (Closed)
Patch Set: After second review. Created 10 years, 5 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 | « chrome/browser/history/history.h ('k') | chrome/browser/history/thumbnail_database.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 ScheduleAndForget(PRIORITY_UI, &HistoryBackend::ScheduleAutocomplete, 642 ScheduleAndForget(PRIORITY_UI, &HistoryBackend::ScheduleAutocomplete,
643 scoped_refptr<HistoryURLProvider>(provider), params); 643 scoped_refptr<HistoryURLProvider>(provider), params);
644 } 644 }
645 645
646 void HistoryService::ScheduleTask(SchedulePriority priority, 646 void HistoryService::ScheduleTask(SchedulePriority priority,
647 Task* task) { 647 Task* task) {
648 // FIXME(brettw) do prioritization. 648 // FIXME(brettw) do prioritization.
649 thread_->message_loop()->PostTask(FROM_HERE, task); 649 thread_->message_loop()->PostTask(FROM_HERE, task);
650 } 650 }
651 651
652 bool HistoryService::CanAddURL(const GURL& url) const { 652 // static
653 bool HistoryService::CanAddURL(const GURL& url) {
653 if (!url.is_valid()) 654 if (!url.is_valid())
654 return false; 655 return false;
655 656
656 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly 657 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly
657 // typed. Right now, however, these are marked as typed even when triggered 658 // typed. Right now, however, these are marked as typed even when triggered
658 // by a shortcut or menu action. 659 // by a shortcut or menu action.
659 if (url.SchemeIs(chrome::kJavaScriptScheme) || 660 if (url.SchemeIs(chrome::kJavaScriptScheme) ||
660 url.SchemeIs(chrome::kChromeUIScheme) || 661 url.SchemeIs(chrome::kChromeUIScheme) ||
661 url.SchemeIs(chrome::kViewSourceScheme) || 662 url.SchemeIs(chrome::kViewSourceScheme) ||
662 url.SchemeIs(chrome::kChromeInternalScheme)) 663 url.SchemeIs(chrome::kChromeInternalScheme))
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 753
753 void HistoryService::StartTopSitesMigration() { 754 void HistoryService::StartTopSitesMigration() {
754 history::TopSites* ts = profile_->GetTopSites(); 755 history::TopSites* ts = profile_->GetTopSites();
755 ts->StartMigration(); 756 ts->StartMigration();
756 } 757 }
757 758
758 void HistoryService::OnTopSitesReady() { 759 void HistoryService::OnTopSitesReady() {
759 ScheduleAndForget(PRIORITY_NORMAL, 760 ScheduleAndForget(PRIORITY_NORMAL,
760 &HistoryBackend::MigrateThumbnailsDatabase); 761 &HistoryBackend::MigrateThumbnailsDatabase);
761 } 762 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/thumbnail_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698