OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 // static | 312 // static |
313 bool JumpList::Enabled() { | 313 bool JumpList::Enabled() { |
314 return JumpListUpdater::IsEnabled(); | 314 return JumpListUpdater::IsEnabled(); |
315 } | 315 } |
316 | 316 |
317 void JumpList::Observe(int type, | 317 void JumpList::Observe(int type, |
318 const content::NotificationSource& source, | 318 const content::NotificationSource& source, |
319 const content::NotificationDetails& details) { | 319 const content::NotificationDetails& details) { |
320 DCHECK(CalledOnValidThread()); | 320 DCHECK(CalledOnValidThread()); |
321 DCHECK_EQ(type, chrome::NOTIFICATION_PROFILE_DESTROYED); | 321 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); |
322 // Profile was destroyed, do clean-up. | 322 // Profile was destroyed, do clean-up. |
323 Terminate(); | 323 Terminate(); |
324 } | 324 } |
325 | 325 |
326 void JumpList::CancelPendingUpdate() { | 326 void JumpList::CancelPendingUpdate() { |
327 DCHECK(CalledOnValidThread()); | 327 DCHECK(CalledOnValidThread()); |
328 if (task_id_ != base::CancelableTaskTracker::kBadTaskId) { | 328 if (task_id_ != base::CancelableTaskTracker::kBadTaskId) { |
329 cancelable_task_tracker_.TryCancel(task_id_); | 329 cancelable_task_tracker_.TryCancel(task_id_); |
330 task_id_ = base::CancelableTaskTracker::kBadTaskId; | 330 task_id_ = base::CancelableTaskTracker::kBadTaskId; |
331 } | 331 } |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 void JumpList::TopSitesLoaded(history::TopSites* top_sites) { | 581 void JumpList::TopSitesLoaded(history::TopSites* top_sites) { |
582 } | 582 } |
583 | 583 |
584 void JumpList::TopSitesChanged(history::TopSites* top_sites, | 584 void JumpList::TopSitesChanged(history::TopSites* top_sites, |
585 ChangeReason change_reason) { | 585 ChangeReason change_reason) { |
586 top_sites->GetMostVisitedURLs( | 586 top_sites->GetMostVisitedURLs( |
587 base::Bind(&JumpList::OnMostVisitedURLsAvailable, | 587 base::Bind(&JumpList::OnMostVisitedURLsAvailable, |
588 weak_ptr_factory_.GetWeakPtr()), | 588 weak_ptr_factory_.GetWeakPtr()), |
589 false); | 589 false); |
590 } | 590 } |
OLD | NEW |