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

Side by Side Diff: chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc

Issue 56143002: Make FaviconService() use Porfile as parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync 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
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/ui/webui/ntp/android/bookmarks_handler.h" 5 #include "chrome/browser/ui/webui/ntp/android/bookmarks_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 DCHECK(partner_bookmarks_shim_ != NULL); 372 DCHECK(partner_bookmarks_shim_ != NULL);
373 const BookmarkNode* node = GetNodeByID(args); 373 const BookmarkNode* node = GetNodeByID(args);
374 if (!node) 374 if (!node)
375 return; 375 return;
376 376
377 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( 377 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
378 profile, Profile::EXPLICIT_ACCESS); 378 profile, Profile::EXPLICIT_ACCESS);
379 favicon_service->GetRawFaviconForURL( 379 favicon_service->GetRawFaviconForURL(
380 FaviconService::FaviconForURLParams( 380 FaviconService::FaviconForURLParams(
381 profile,
382 node->url(), 381 node->url(),
383 chrome::TOUCH_PRECOMPOSED_ICON | chrome::TOUCH_ICON | 382 chrome::TOUCH_PRECOMPOSED_ICON | chrome::TOUCH_ICON |
384 chrome::FAVICON, 383 chrome::FAVICON,
385 0), // request the largest icon. 384 0), // request the largest icon.
386 ui::SCALE_FACTOR_100P, // density doesn't matter for the largest icon. 385 ui::SCALE_FACTOR_100P, // density doesn't matter for the largest icon.
387 base::Bind(&BookmarksHandler::OnShortcutFaviconDataAvailable, 386 base::Bind(&BookmarksHandler::OnShortcutFaviconDataAvailable,
388 base::Unretained(this), 387 base::Unretained(this),
389 node), 388 node),
390 &cancelable_task_tracker_); 389 &cancelable_task_tracker_);
391 } 390 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 return true; 488 return true;
490 489
491 return !managed_bookmarks_shim_->IsManagedBookmark(node); 490 return !managed_bookmarks_shim_->IsManagedBookmark(node);
492 } 491 }
493 492
494 bool BookmarksHandler::IsRoot(const BookmarkNode* node) const { 493 bool BookmarksHandler::IsRoot(const BookmarkNode* node) const {
495 return node->is_root() && 494 return node->is_root() &&
496 node != partner_bookmarks_shim_->GetPartnerBookmarksRoot() && 495 node != partner_bookmarks_shim_->GetPartnerBookmarksRoot() &&
497 node != managed_bookmarks_shim_->GetManagedBookmarksRoot(); 496 node != managed_bookmarks_shim_->GetManagedBookmarksRoot();
498 } 497 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698