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

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

Issue 53283004: Adding support for forced URLs to TopSites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed GetAllMostVisited. Created 7 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 | Annotate | Revision Log
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 #include "chrome/browser/jumplist_win.h" 5 #include "chrome/browser/jumplist_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shobjidl.h> 8 #include <shobjidl.h>
9 #include <propkey.h> 9 #include <propkey.h>
10 #include <propvarutil.h> 10 #include <propvarutil.h>
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 void JumpList::Observe(int type, 519 void JumpList::Observe(int type,
520 const content::NotificationSource& source, 520 const content::NotificationSource& source,
521 const content::NotificationDetails& details) { 521 const content::NotificationDetails& details) {
522 switch (type) { 522 switch (type) {
523 case chrome::NOTIFICATION_TOP_SITES_CHANGED: { 523 case chrome::NOTIFICATION_TOP_SITES_CHANGED: {
524 // Most visited urls changed, query again. 524 // Most visited urls changed, query again.
525 history::TopSites* top_sites = profile_->GetTopSites(); 525 history::TopSites* top_sites = profile_->GetTopSites();
526 if (top_sites) { 526 if (top_sites) {
527 top_sites->GetMostVisitedURLs( 527 top_sites->GetMostVisitedURLs(
528 base::Bind(&JumpList::OnMostVisitedURLsAvailable, 528 base::Bind(&JumpList::OnMostVisitedURLsAvailable,
529 weak_ptr_factory_.GetWeakPtr())); 529 weak_ptr_factory_.GetWeakPtr()), false);
530 } 530 }
531 break; 531 break;
532 } 532 }
533 case chrome::NOTIFICATION_PROFILE_DESTROYED: { 533 case chrome::NOTIFICATION_PROFILE_DESTROYED: {
534 // Profile was destroyed, do clean-up. 534 // Profile was destroyed, do clean-up.
535 Terminate(); 535 Terminate();
536 break; 536 break;
537 } 537 }
538 default: 538 default:
539 NOTREACHED() << "Unexpected notification type."; 539 NOTREACHED() << "Unexpected notification type.";
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 } 754 }
755 755
756 void JumpList::CreateIconFiles(const ShellLinkItemList& item_list) { 756 void JumpList::CreateIconFiles(const ShellLinkItemList& item_list) {
757 for (ShellLinkItemList::const_iterator item = item_list.begin(); 757 for (ShellLinkItemList::const_iterator item = item_list.begin();
758 item != item_list.end(); ++item) { 758 item != item_list.end(); ++item) {
759 base::FilePath icon_path; 759 base::FilePath icon_path;
760 if (CreateIconFile((*item)->data(), icon_dir_, &icon_path)) 760 if (CreateIconFile((*item)->data(), icon_dir_, &icon_path))
761 (*item)->SetIcon(icon_path.value(), 0, true); 761 (*item)->SetIcon(icon_path.value(), 0, true);
762 } 762 }
763 } 763 }
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_impl_unittest.cc ('k') | chrome/browser/search/instant_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698