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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 49283004: Add UMA stats for tracking bookmark depth (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky 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 | 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 DCHECK([sender respondsToSelector:@selector(bookmarkNode)]); 666 DCHECK([sender respondsToSelector:@selector(bookmarkNode)]);
667 const BookmarkNode* node = [sender bookmarkNode]; 667 const BookmarkNode* node = [sender bookmarkNode];
668 DCHECK(node); 668 DCHECK(node);
669 WindowOpenDisposition disposition = 669 WindowOpenDisposition disposition =
670 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); 670 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
671 RecordAppLaunch(browser_->profile(), node->url()); 671 RecordAppLaunch(browser_->profile(), node->url());
672 [self openURL:node->url() disposition:disposition]; 672 [self openURL:node->url() disposition:disposition];
673 673
674 if (!animate) 674 if (!animate)
675 [self closeFolderAndStopTrackingMenus]; 675 [self closeFolderAndStopTrackingMenus];
676 RecordBookmarkLaunch([self bookmarkLaunchLocation]); 676 RecordBookmarkLaunch(node, [self bookmarkLaunchLocation]);
677 } 677 }
678 678
679 // Common function to open a bookmark folder of any type. 679 // Common function to open a bookmark folder of any type.
680 - (void)openBookmarkFolder:(id)sender { 680 - (void)openBookmarkFolder:(id)sender {
681 DCHECK([sender isKindOfClass:[BookmarkButton class]]); 681 DCHECK([sender isKindOfClass:[BookmarkButton class]]);
682 DCHECK([[sender cell] isKindOfClass:[BookmarkButtonCell class]]); 682 DCHECK([[sender cell] isKindOfClass:[BookmarkButtonCell class]]);
683 683
684 // Only record the action if it's the initial folder being opened. 684 // Only record the action if it's the initial folder being opened.
685 if (!showFolderMenus_) 685 if (!showFolderMenus_)
686 RecordBookmarkFolderOpen([self bookmarkLaunchLocation]); 686 RecordBookmarkFolderOpen([self bookmarkLaunchLocation]);
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
2673 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 2673 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
2674 (const BookmarkNode*)node { 2674 (const BookmarkNode*)node {
2675 // See if it's in the bar, then if it is in the hierarchy of visible 2675 // See if it's in the bar, then if it is in the hierarchy of visible
2676 // folder menus. 2676 // folder menus.
2677 if (bookmarkModel_->bookmark_bar_node() == node) 2677 if (bookmarkModel_->bookmark_bar_node() == node)
2678 return self; 2678 return self;
2679 return [folderController_ controllerForNode:node]; 2679 return [folderController_ controllerForNode:node];
2680 } 2680 }
2681 2681
2682 @end 2682 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698