Skip to content

Instantly share code, notes, and snippets.

@g-eorge
Created September 4, 2011 21:35
Show Gist options
  • Save g-eorge/1193546 to your computer and use it in GitHub Desktop.
Save g-eorge/1193546 to your computer and use it in GitHub Desktop.
Patch to get rid of favicons on the Chromium bookmark bar
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index ecf841a..84f9152 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -1537,7 +1537,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
// Return an autoreleased NSCell suitable for a bookmark button.
// TODO(jrg): move much of the cell config into the BookmarkButtonCell class.
- (BookmarkButtonCell*)cellForBookmarkNode:(const BookmarkNode*)node {
- NSImage* image = node ? [self faviconForNode:node] : nil;
+ NSImage* image = nil; // Hack to never add a favicon! // node ? [self faviconForNode:node] : nil;
NSMenu* menu = node && node->is_folder() ? buttonFolderContextMenu_ :
buttonContextMenu_;
BookmarkButtonCell* cell = [BookmarkButtonCell buttonCellForNode:node
@@ -1982,7 +1982,9 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
const BookmarkNode* cellnode = [button bookmarkNode];
if (cellnode == node) {
[[button cell] setBookmarkCellText:[button title]
- image:[self faviconForNode:node]];
+ // Hack to never show a favicon
+ image:nil];
+ //image:[self faviconForNode:node]];
// Adding an image means we might need more room for the
// bookmark. Test for it by growing the button (if needed)
// and shifting everything else over.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment