| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 456 } |
| 457 } | 457 } |
| 458 | 458 |
| 459 if (!waiting_for_icons) { | 459 if (!waiting_for_icons) { |
| 460 // No more favicons are needed by the application JumpList. Schedule a | 460 // No more favicons are needed by the application JumpList. Schedule a |
| 461 // RunUpdateOnFileThread call. | 461 // RunUpdateOnFileThread call. |
| 462 PostRunUpdate(); | 462 PostRunUpdate(); |
| 463 return; | 463 return; |
| 464 } | 464 } |
| 465 | 465 |
| 466 FaviconService* favicon_service = | 466 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( |
| 467 FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS); | 467 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
| 468 task_id_ = favicon_service->GetFaviconImageForPageURL( | 468 task_id_ = favicon_service->GetFaviconImageForPageURL( |
| 469 url, | 469 url, |
| 470 base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)), | 470 base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)), |
| 471 &cancelable_task_tracker_); | 471 &cancelable_task_tracker_); |
| 472 } | 472 } |
| 473 | 473 |
| 474 void JumpList::OnFaviconDataAvailable( | 474 void JumpList::OnFaviconDataAvailable( |
| 475 const favicon_base::FaviconImageResult& image_result) { | 475 const favicon_base::FaviconImageResult& image_result) { |
| 476 // If there is currently a favicon request in progress, it is now outdated, | 476 // If there is currently a favicon request in progress, it is now outdated, |
| 477 // as we have received another, so nullify the handle from the old request. | 477 // as we have received another, so nullify the handle from the old request. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 link->set_icon_data(avatar.AsBitmap()); | 601 link->set_icon_data(avatar.AsBitmap()); |
| 602 new_profile_switcher.push_back(link); | 602 new_profile_switcher.push_back(link); |
| 603 } | 603 } |
| 604 } | 604 } |
| 605 | 605 |
| 606 { | 606 { |
| 607 base::AutoLock auto_lock(list_lock_); | 607 base::AutoLock auto_lock(list_lock_); |
| 608 new_profile_switcher.swap(profile_switcher_); | 608 new_profile_switcher.swap(profile_switcher_); |
| 609 } | 609 } |
| 610 } | 610 } |
| OLD | NEW |