OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/bookmarks/bookmark_stats.h" | 5 #include "chrome/browser/bookmarks/bookmark_stats.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "components/bookmarks/browser/bookmark_model.h" | 8 #include "components/bookmarks/browser/bookmark_model.h" |
9 #include "content/public/browser/user_metrics.h" | 9 #include "content/public/browser/user_metrics.h" |
10 | 10 |
11 using bookmarks::BookmarkNode; | 11 using bookmarks::BookmarkNode; |
12 | 12 |
13 void RecordBookmarkLaunch(const BookmarkNode* node, | 13 void RecordBookmarkLaunch(const BookmarkNode* node, |
14 BookmarkLaunchLocation location) { | 14 BookmarkLaunchLocation location) { |
15 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || | 15 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || |
16 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { | 16 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { |
17 content::RecordAction( | 17 content::RecordAction( |
(...skipping 24 matching lines...) Expand all Loading... |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 void RecordBookmarkAppsPageOpen(BookmarkLaunchLocation location) { | 45 void RecordBookmarkAppsPageOpen(BookmarkLaunchLocation location) { |
46 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || | 46 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || |
47 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { | 47 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { |
48 content::RecordAction( | 48 content::RecordAction( |
49 base::UserMetricsAction("ClickedBookmarkBarAppsShortcutButton")); | 49 base::UserMetricsAction("ClickedBookmarkBarAppsShortcutButton")); |
50 } | 50 } |
51 } | 51 } |
OLD | NEW |