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

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

Issue 330603004: Rename FaviconBitmapXxx to FaviconRawBitmapXxx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 6 years, 6 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 | 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 "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/file_util.h" 10 #include "base/file_util.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 BrowserThread::FILE, FROM_HERE, 389 BrowserThread::FILE, FROM_HERE,
390 base::Bind(&JumpList::RunUpdate, this)); 390 base::Bind(&JumpList::RunUpdate, this));
391 return; 391 return;
392 } 392 }
393 // Ask FaviconService if it has a favicon of a URL. 393 // Ask FaviconService if it has a favicon of a URL.
394 // When FaviconService has one, it will call OnFaviconDataAvailable(). 394 // When FaviconService has one, it will call OnFaviconDataAvailable().
395 url = GURL(icon_urls_.front().first); 395 url = GURL(icon_urls_.front().first);
396 } 396 }
397 FaviconService* favicon_service = 397 FaviconService* favicon_service =
398 FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS); 398 FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS);
399 task_id_ = favicon_service->GetFaviconImageForURL( 399 task_id_ = favicon_service->GetFaviconImageForPageURL(
400 FaviconService::FaviconForURLParams( 400 FaviconService::FaviconForPageURLParams(
401 url, favicon_base::FAVICON, gfx::kFaviconSize), 401 url, favicon_base::FAVICON, gfx::kFaviconSize),
402 base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)), 402 base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)),
403 &cancelable_task_tracker_); 403 &cancelable_task_tracker_);
404 } 404 }
405 405
406 void JumpList::OnFaviconDataAvailable( 406 void JumpList::OnFaviconDataAvailable(
407 const favicon_base::FaviconImageResult& image_result) { 407 const favicon_base::FaviconImageResult& image_result) {
408 // If there is currently a favicon request in progress, it is now outdated, 408 // If there is currently a favicon request in progress, it is now outdated,
409 // as we have received another, so nullify the handle from the old request. 409 // as we have received another, so nullify the handle from the old request.
410 task_id_ = base::CancelableTaskTracker::kBadTaskId; 410 task_id_ = base::CancelableTaskTracker::kBadTaskId;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 466
467 void JumpList::CreateIconFiles(const ShellLinkItemList& item_list) { 467 void JumpList::CreateIconFiles(const ShellLinkItemList& item_list) {
468 for (ShellLinkItemList::const_iterator item = item_list.begin(); 468 for (ShellLinkItemList::const_iterator item = item_list.begin();
469 item != item_list.end(); ++item) { 469 item != item_list.end(); ++item) {
470 base::FilePath icon_path; 470 base::FilePath icon_path;
471 if (CreateIconFile((*item)->icon_data(), icon_dir_, &icon_path)) 471 if (CreateIconFile((*item)->icon_data(), icon_dir_, &icon_path))
472 (*item)->set_icon(icon_path.value(), 0); 472 (*item)->set_icon(icon_path.value(), 0);
473 } 473 }
474 } 474 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_service.cc ('k') | chrome/browser/notifications/message_center_settings_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698